wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

#include <\c>

Total questions: 13

Worksheet time: 17mins

Name
Class
Date
1.

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

a)

int num1;

b)

int num_1;

c)

int $num1;

d)

int num;

2.

What is an example of iteration in C?

a)

for

b)

while

c)

do-while

d)

all of these

3.

scanf() is a predefined function in______header file.

a)

stdlib. h

b)

ctype. h

c)

stdio. h

d)

stdarg. h

4.

what is the output of the following code snippet?

a)

10

b)

20

c)

Error

d)

None of these

5.

Which of the following is the characteristics of an algorithm?

a)

Feasibility

b)

Finiteness

c)

Unambiguous

d)

All of these

6.

what is the output of the following code snippet?

a)

4 6 2

b)

2 4 6

c)

2 2 4

d)

4 6 6

7.

what is the output of the following code snippet?

a)

10

b)

0

c)

10 10 10 10....(infinity loop)

d)

error

8.

Which of the following is not a keyword?

a)

break

b)

void

c)

name

d)

while

9.

' >= ' is type of _________ operator

a)

logical operator

b)

relational operator

c)

arithmetic operator

d)

none of these

10.

What is the output of the following code snippet?

a)

0 5 1 4 2 3

b)

0 5 1 4

c)

0 1 2 3 4 5

d)

5 4 3 2 1 0

11.

what is the output of the following code snippet?

a)

MBCET

b)

CET

c)

SCT

d)

ERROR

12.

what is the output of the following code snippet?

a)

oops

b)

0

c)

I got you

d)

0I got you

13.

what is the output of the following code snippet?

a)

25

b)

0

c)

25 0

d)

compiler error