wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CMDP2060 - Programming Design and Implementation (W01 - W03)

Total questions: 15

Worksheet time: 16mins

Name
Class
Date
1.

What is a computer?

a)

A machine that accepts data, processes it, and produces output

b)

A device that only stores data

c)

A machine used exclusively for gaming

d)

A tool for managing physical documents

2.

Which of the following devices are considered input devices for a computer?

a)

Printer and Monitor

b)

Keyboard and Mouse

c)

Hard drive and RAM

d)

CPU and GPU

3.

Which of the following is an example of application software?

a)

Operating system

b)

Network tools

c)

Compilers

d)

Word processors

4.

What does CLI stand for?

a)

Computer Logic Interface

b)

Command Line Interface

c)

Central Line Integration

d)

Command Logic Interface

5.

Which of the following is true about a Command Line Interface (CLI)?

a)

It relies on graphical elements for user interaction

b)

It uses menus and buttons to perform tasks

c)

It displays a prompt where users can type commands

d)

It is mainly used for browsing the internet

6.

What is the decimal equivalent of the binary number 1011?

a)

7

b)

9

c)

11

d)

13

7.

What is the binary equivalent of the decimal number 15?

a)

1100

b)

1101

c)

1110

d)

1111

8.

What is the binary equivalent of the octal number 7?

a)

111

b)

100

c)

101

d)

110

9.

What does the following pseudocode snippet accomplish?

a)

Prints "Greater than 10" if x is 10

b)

Prints "10 or less" if x is 10

c)

Only checks if x is equal to 10

d)

Always prints "Greater than 10"

10.

Which data type would you use to store a single character in Java?

a)

String

b)

char

c)

Character

d)

byte

11.

What will be the value for the variable ‘result’ for the following Boolean expression?

boolean a = true;

boolean b = false;

boolean result = a && b;

a)

true

b)

false

c)

null

d)

Compiler error

12.

What will be the output of the following code snippet?

a)

true

b)

false

c)

10

d)

5

13.

Which of the following is the correct way to write a NOT operation in Java?

a)

!a

b)

~a

c)

-a

d)

a!

14.

What will be the output of this pseudocode?

a)

Grade: A

b)

Grade: B

c)

Grade: C

d)

No output

15.

What does the following Java code snippet do?

a)

Prints all numbers from 0 to 4

b)

Prints all odd numbers from 0 to 4

c)

Prints all even numbers from 0 to 4

d)

Prints nothing