Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Quiz

Total questions: 45

Worksheet time: 45mins

Name
Class
Date
1.

What is the smallest unit of data in a computer?

a)

Megabyte

b)

Byte

c)

Bit

d)

Kilobyte

2.

Which of the following is NOT a characteristic of a computer?

a)

Speed

b)

Diligence

c)

Emotional Intelligence

d)

Accuracy

3.

What does CPU stand for?

a)

Central Programming Unit

b)

Central Processing Unit

c)

Computer Processing Unit

d)

Central Peripheral Unit

4.

Which memory is volatile?

a)

ROM

b)

USB Drive

c)

RAM

d)

Hard Disk

5.

What is the primary function of the Control Unit?

a)

Perform arithmetic operations

b)

Store data

c)

Control the operations of the computer

d)

Input data

6.

Which of the following is an input device?

a)

Printer

b)

Speaker

c)

Keyboard

d)

Monitor

7.

What is the purpose of the ALU?

a)

Store data

b)

Perform arithmetic and logical operations

c)

Manage input and output

d)

Control the CPU

8.

Which of the following is a secondary storage device?

a)

Hard Disk

b)

ROM

c)

RAM

d)

Cache Memory

9.

What is the function of the Memory Unit in a computer?

a)

Input data

b)

Output data

c)

Store data

d)

Process data

10.

What is the main purpose of problem solving?

a)

To make decisions

b)

To develop solutions

c)

To identify problems

d)

All of the above

11.

Which of the following is a characteristic of algorithms?

a)

Finiteness

b)

Randomness

c)

Ambiguity

d)

Complexity

12.

What does the term 'iteration' refer to in programming?

a)

Inputting data

b)

Storing data

c)

Making decisions

d)

Repeating a process

13.

Which operator is used for logical AND in C?

a)

!

b)

==

c)

||

d)

&&

14.

What is the output of the expression 5 % 2?

a)

5

b)

2

c)

1

d)

0

15.

Which of the following is a valid variable name in C?

a)

1stVariable

b)

variable-name

c)

variable name

d)

_variable

16.

What is the purpose of the scanf function?

a)

To print output

b)

To read input

c)

To perform calculations

d)

To store data

17.

What will be the output of printf("%d", 5 + 3);?

a)

5

b)

Error

c)

8

d)

53

18.

Which of the following is NOT a data type in C?

a)

string

b)

float

c)

int

d)

char

19.

What is the output of the expression 10 / 3 in C?

a)

3.33

b)

3

c)

Error

d)

3.0

20.

Which of the following is a logical operator?

a)

&&

b)

%

c)

++

d)

--

21.

What does the term 'syntax' refer to in programming?

a)

The structure of code

b)

The meaning of code

c)

The execution of code

d)

The debugging of code

22.

What is the output of the following code: printf("Hello World");?

a)

Error

b)

World

c)

Hello

d)

Hello World

23.

Which of the following is a valid comment in C?

a)

/* This is a comment */

b)

Both 1 and 2

c)

// This is a comment

d)

# This is a comment

24.

What is the output of the expression 2 + 3 * 4?

a)

12

b)

14

c)

20

d)

10

25.

Which of the following is a feature of C language?

a)

Object-oriented

b)

Low-level

c)

High-level

d)

Both 2 and 3

26.

What is the purpose of the main function in C?

a)

To perform calculations

b)

To end the program

c)

To start the program

d)

To define variables

27.

What is the output of printf("%d", 10);?

a)

None

b)

10.0

c)

Error

d)

10

28.

Which of the following is a loop structure in C?

a)

case

b)

if

c)

for

d)

switch

29.

What is the output of the expression 7 - 2 * 3?

a)

1

b)

5

c)

12

d)

7

30.

Which of the following is a type of loop in C?

a)

for

b)

while

c)

do-while

d)

All of the above

31.

What is the purpose of the sizeof operator in C?

a)

To determine the size of a variable

b)

To compare two values

c)

To allocate memory

d)

To print the size of data types

32.

What is the output of the following code: printf("%s", "Hello");?

a)

None

b)

"Hello"

c)

Hello

d)

Error

33.

What is the result of the expression 15 / 5 + 2 * 3?

a)

7

b)

9

c)

11

d)

8

34.

Which of the following is a valid conditional statement in C?

a)

if (x > 0)

b)

for (i = 0; i < 10; i++)

c)

All of the above

d)

while (true)

35.

Which of the following is a primary storage device?

a)

RAM

b)

Hard Disk

c)

CD-ROM

d)

USB Drive

36.

What is the output of the expression 5 * 2 - 3?

a)

10

b)

8

c)

5

d)

7

37.

Which of the following is a conditional statement in C?

a)

while

b)

if

c)

switch

d)

for

38.

What is the role of the Memory Management Unit (MMU)?

a)

To control input and output devices

b)

To perform arithmetic operations

c)

To execute instructions

d)

To manage memory allocation and access

39.

What does the term 'recursion' mean in programming?

a)

Calling a function within itself

b)

Iterating through a loop

c)

Storing data in a variable

d)

None of the above

40.

What is the output of the expression 10 - 4 / 2?

a)

6

b)

7

c)

5

d)

8

41.

Which of the following is a non-volatile memory type?

a)

ROM

b)

Registers

c)

Cache Memory

d)

RAM

42.

Which of the following is a valid way to declare an array in C?

a)

int arr[];

b)

None of the above

c)

Both of the above

d)

int arr[10];

43.

What is the output of the expression 8 + 4 / 2?

a)

8

b)

12

c)

6

d)

10

44.

What is the output of the expression 3 * (2 + 1)?

a)

3

b)

6

c)

12

d)

9

45.

What does the term 'variable' refer to in programming?

a)

A function

b)

A type of loop

c)

A storage location with a name

d)

A fixed value