wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

day4

Total questions: 15

Worksheet time: 26mins

Name
Class
Date
1.

a)

None of the listed options

b)

(1)goto addition; (2)addition: printf("%d\n",sum);

c)

(1)goto: (2)addition: printf("%d\n",sum);

d)

(1)goto addition; (2)printf("%d\n",sum);

2.

a)

100

b)

10

c)

1

d)

None of the listed options

3.

a)

10

b)

0

c)

1

d)

None of the listed options

4.

a)

6

b)

120

c)

55

d)

error

5.

Choose the correct code which prints multiplication table for 3 using do-while loop?

a)
b)
c)
d)

None of the listed options

6.

Choose the correct code which prints the sum of 5 numbers using for loop?

a)
b)
c)
d)

All of the mentioned options.

7.



(a)  

8.

a)

10

b)

1

c)

0

d)

5

9.

Choose the correct code which prints numbers from 1 to 5 using while loop?

a)
b)
c)
d)

None of the listed options

10.
a)

Case NULL

b)

Case NULL Case Zero

c)

DEFAULT

d)

Case Zero

e)

Error: duplicate case values

11.

a)

1)marks >= 90

2)marks >= 70 && marks < 90

3)marks <= 50 && marks < 70

b)

1)marks >= 90

2)marks <= 70 && marks < 90

3)marks >= 50 && marks < 70

c)

1)marks <= 90 && marks < 100

2)marks >= 70 && marks < 90

3)marks >= 50 && marks < 70

d)

1)marks >= 90 && marks <= 100

2)marks >= 70 && marks < 90

3)marks >= 50 && marks < 70

12.

Choose the correct code to find whether a number is positive or negative or zero.

a)
b)
c)
d)
13.
a)

(age<18), (age<18), (age<60)

b)

(age<18), (age>18), (age<60)

c)

(age<18), (age>18), (age>60)

d)

(age<18), (age>=18), (age<60)

14.

a)

10

b)

30

c)

20

d)

1

15.

a)

10

b)

20

c)

30

d)

1