wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

GEEKME

Total questions: 15

Worksheet time: 6mins

Name
Class
Date
1.

What will be the output of the following?

int ch=20;

printf(“%d %d %d”,ch,++ch,ch);

a)

20 21 21

b)

21 21 21

c)

21 21 20

d)

20 20 21

2.

Which amongst both is used in a conditional statement?

val=20 or val==20

a)

val==20

b)

val=20

c)

Both

d)

None

3.

How many errors are there in the following code?

a)

2

b)

5

c)

3

d)

4

4.

What will be the output of the following code?

a)

Compilation error

b)

12345

c)

Infinite Loop

d)

Debugging error

5.

What will be the output of the following?

a)

10 20 30

b)

10 30 20

c)

Error

d)

Garbage Value

6.

How many times the iteration in the loop be executed?

a)

14

b)

15

c)

16

d)

None of these

7.

What will be output of the following code?

a)

3

b)

4

c)

Undefined

d)

Error

8.

What will be the output of the following code?

a)

9

b)

5

c)

4

d)

Undefined

9.

What will be the output of the following code?

a)

Runtime Error

b)

Compilation error

c)

o

d)

none of these

10.

Which of the following is a user defined function?

a)

printf()

b)

scanf()

c)

main()

d)

none

11.

Is it possible to run a program without main?

a)

Yes

b)

No

c)

Can't say

d)

Error

12.

Which amongst the following is the significance of algorithm in C programming?

a)

I and III

b)

I and II

c)

I,II,III

d)

II and III

13.

What will be the output of the C program?

a)

Function in C is awesome

b)

no output

c)

Runtime error

d)

Compilation error

14.

How many parameters does a function prototype contain?

a)

1

b)

2

c)

3

d)

4

15.

What will be the output of the code:

a)

Error

b)

case 1 executed

c)

case 1 executed case 2 executed

d)

Default block executed