wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C Programming Quiz

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.

Which of the following is a valid C data type?

a)

number

b)

real

c)

int

d)

digit

2.

Which data type is used to store a single character?

a)

int

b)

char

c)

float

d)

double

3.

What is the size of char in C?

a)

2 bytes

b)

4 bytes

c)

8 bytes

d)

1 byte

4.

Which data type stores large decimal values?

a)

float

b)

int

c)

double

d)

char

5.

Why is C called a “middle-level language”?

a)

Only supports high level features

b)

Only supports hardware programming

c)

Supports both low-level and high-level programming

d)

Runs only on Linux

6.

Which is NOT an advantage of C?

a)

Fast execution

b)

Portable

c)

Automatic garbage collection

d)

Structured programming

7.

Who developed C language?

a)

James Gosling

b)

Dennis Ritchie

c)

Bjarne Stroustrup

d)

Guido van Rossum

8.

Which symbol ends a C statement?

a)

:

b)

,

c)

;

d)

.

9.

Which data type is used to store decimal values?

a)

int

b)

char

c)

float

d)

void

10.

What is the size of int (usually)?

a)

1 byte

b)

2 bytes

c)

4 bytes

d)

8 bytes

11.

Which keyword is used to define a constant?

a)

const

b)

define

c)

static

d)

final

12.

Which operator is used to get remainder?

a)

/

b)

%

c)

*

d)

+

13.

What is a function?

a)

Variable

b)

Loop

c)

Block of reusable code

d)

Operator

14.

Main function in C is:

a)

Optional

b)

Cannot return value

c)

Entry point of program

d)

Loop

15.

Which symbol is used for pointer?

a)

#

b)

*

c)

&

d)

%

16.

Which header file is needed for printf()?

a)

stdlib.h

b)

math.h

c)

stdio.h

d)

string.h