WorksheetsCMDP2060 - Programming Design and Implementation (W01 - W03)
Total questions: 15
Worksheet time: 16mins
What is a computer?
A machine that accepts data, processes it, and produces output
A device that only stores data
A machine used exclusively for gaming
A tool for managing physical documents
Which of the following devices are considered input devices for a computer?
Printer and Monitor
Keyboard and Mouse
Hard drive and RAM
CPU and GPU
Which of the following is an example of application software?
Operating system
Network tools
Compilers
Word processors
What does CLI stand for?
Computer Logic Interface
Command Line Interface
Central Line Integration
Command Logic Interface
Which of the following is true about a Command Line Interface (CLI)?
It relies on graphical elements for user interaction
It uses menus and buttons to perform tasks
It displays a prompt where users can type commands
It is mainly used for browsing the internet
What is the decimal equivalent of the binary number 1011?
7
9
11
13
What is the binary equivalent of the decimal number 15?
1100
1101
1110
1111
What is the binary equivalent of the octal number 7?
111
100
101
110
What does the following pseudocode snippet accomplish?
Prints "Greater than 10" if x is 10
Prints "10 or less" if x is 10
Only checks if x is equal to 10
Always prints "Greater than 10"
Which data type would you use to store a single character in Java?
String
char
Character
byte
What will be the value for the variable ‘result’ for the following Boolean expression?
boolean a = true;
boolean b = false;
boolean result = a && b;
true
false
null
Compiler error
What will be the output of the following code snippet?
true
false
10
5
Which of the following is the correct way to write a NOT operation in Java?
!a
~a
-a
a!
What will be the output of this pseudocode?
Grade: A
Grade: B
Grade: C
No output
What does the following Java code snippet do?
Prints all numbers from 0 to 4
Prints all odd numbers from 0 to 4
Prints all even numbers from 0 to 4
Prints nothing
