WorksheetsComputer Science Quiz
Total questions: 45
Worksheet time: 45mins
What is the smallest unit of data in a computer?
Megabyte
Byte
Bit
Kilobyte
Which of the following is NOT a characteristic of a computer?
Speed
Diligence
Emotional Intelligence
Accuracy
What does CPU stand for?
Central Programming Unit
Central Processing Unit
Computer Processing Unit
Central Peripheral Unit
Which memory is volatile?
ROM
USB Drive
RAM
Hard Disk
What is the primary function of the Control Unit?
Perform arithmetic operations
Store data
Control the operations of the computer
Input data
Which of the following is an input device?
Printer
Speaker
Keyboard
Monitor
What is the purpose of the ALU?
Store data
Perform arithmetic and logical operations
Manage input and output
Control the CPU
Which of the following is a secondary storage device?
Hard Disk
ROM
RAM
Cache Memory
What is the function of the Memory Unit in a computer?
Input data
Output data
Store data
Process data
What is the main purpose of problem solving?
To make decisions
To develop solutions
To identify problems
All of the above
Which of the following is a characteristic of algorithms?
Finiteness
Randomness
Ambiguity
Complexity
What does the term 'iteration' refer to in programming?
Inputting data
Storing data
Making decisions
Repeating a process
Which operator is used for logical AND in C?
!
==
||
&&
What is the output of the expression 5 % 2?
5
2
1
0
Which of the following is a valid variable name in C?
1stVariable
variable-name
variable name
_variable
What is the purpose of the scanf function?
To print output
To read input
To perform calculations
To store data
What will be the output of printf("%d", 5 + 3);?
5
Error
8
53
Which of the following is NOT a data type in C?
string
float
int
char
What is the output of the expression 10 / 3 in C?
3.33
3
Error
3.0
Which of the following is a logical operator?
&&
%
++
--
What does the term 'syntax' refer to in programming?
The structure of code
The meaning of code
The execution of code
The debugging of code
What is the output of the following code: printf("Hello World");?
Error
World
Hello
Hello World
Which of the following is a valid comment in C?
/* This is a comment */
Both 1 and 2
// This is a comment
# This is a comment
What is the output of the expression 2 + 3 * 4?
12
14
20
10
Which of the following is a feature of C language?
Object-oriented
Low-level
High-level
Both 2 and 3
What is the purpose of the main function in C?
To perform calculations
To end the program
To start the program
To define variables
What is the output of printf("%d", 10);?
None
10.0
Error
10
Which of the following is a loop structure in C?
case
if
for
switch
What is the output of the expression 7 - 2 * 3?
1
5
12
7
Which of the following is a type of loop in C?
for
while
do-while
All of the above
What is the purpose of the sizeof operator in C?
To determine the size of a variable
To compare two values
To allocate memory
To print the size of data types
What is the output of the following code: printf("%s", "Hello");?
None
"Hello"
Hello
Error
What is the result of the expression 15 / 5 + 2 * 3?
7
9
11
8
Which of the following is a valid conditional statement in C?
if (x > 0)
for (i = 0; i < 10; i++)
All of the above
while (true)
Which of the following is a primary storage device?
RAM
Hard Disk
CD-ROM
USB Drive
What is the output of the expression 5 * 2 - 3?
10
8
5
7
Which of the following is a conditional statement in C?
while
if
switch
for
What is the role of the Memory Management Unit (MMU)?
To control input and output devices
To perform arithmetic operations
To execute instructions
To manage memory allocation and access
What does the term 'recursion' mean in programming?
Calling a function within itself
Iterating through a loop
Storing data in a variable
None of the above
What is the output of the expression 10 - 4 / 2?
6
7
5
8
Which of the following is a non-volatile memory type?
ROM
Registers
Cache Memory
RAM
Which of the following is a valid way to declare an array in C?
int arr[];
None of the above
Both of the above
int arr[10];
What is the output of the expression 8 + 4 / 2?
8
12
6
10
What is the output of the expression 3 * (2 + 1)?
3
6
12
9
What does the term 'variable' refer to in programming?
A function
A type of loop
A storage location with a name
A fixed value
