wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

C Programming Quiz

Total questions: 19

Worksheet time: 10mins

Name
Class
Date
1.

What is the primary purpose of a computer?

a)

To store data permanently

b)

To run software applications

c)

To connect to the internet

d)

To accept information, process it, and provide results

2.

Who is known as the 'father of the computer'?

a)

Bill Gates

b)

Charles Babbage

c)

Alan Turing

d)

Steve Jobs

3.

What are the two major components of a computer system?

a)

CPU and GPU

b)

Hardware and Software

c)

Input and Output

d)

Memory and Storage

4.

Which of the following is an example of an input device?

a)

Printer

b)

Keyboard

c)

Speaker

d)

Monitor

5.

What does the term 'software' refer to?

a)

Physical components of a computer

b)

Data stored on a hard drive

c)

Network connections

d)

Programs that run on a computer

6.

Which programming language was developed to write the UNIX operating system?

a)

Python

b)

Ruby

c)

Java

d)

C

7.

What is the purpose of a flowchart?

a)

To write code

b)

To debug programs

c)

To represent an algorithm graphically

d)

To store data

8.

What is an algorithm?

a)

A hardware component

b)

A programming language

c)

A step-by-step procedure for solving a problem

d)

A type of software

9.

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

a)

int

b)

string

c)

float

d)

char

10.

What does the 'printf' function do in C?

a)

Reads input from the user

b)

Declares variables

c)

Compiles the program

d)

Prints output to the console

11.

Which operator is used for addition in C?

a)

-

b)

*

c)

+

d)

/

12.

What is the output of the expression '5 % 2' in C?

a)

5

b)

1

c)

0

d)

2

13.

What is the purpose of the 'scanf' function?

a)

To compile code

b)

To declare variables

c)

To read input

d)

To print output

14.

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

a)

variable-name

b)

variable_name

c)

float

d)

1stVariable

15.

What does the 'const' keyword do in C?

a)

Allocates memory

b)

Declares a variable

c)

Defines a constant value

d)

Creates a function

16.

Which of the following is a logical operator in C?

a)

&&

b)

++

c)

==

d)

!=

17.

What is the result of the expression '!(5 > 3)'?

a)

False

b)

1

c)

0

d)

True

18.

What is the purpose of type casting in C?

a)

To change the data type of a variable

b)

To declare a variable

c)

To read input

d)

To print output

19.

Which of the following is a unary operator?

a)

All of the above

b)

-

c)

++

d)

+