wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

FIVIZZ: WEEK 11 - PROGRAMMING 2

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

select the syntax can cause infinite loop?

a)

( ; ;)

b)

for(a=1;a<=10;a--)

c)

while(num=1)

d)

do

{

printf("Value of variable j is: %d\n", j);

j++;

}while (j<=3);

2.

which one is not an sentinal

a)

flag value

b)

signal value

c)

dummy data

d)

counter value

3.

name the pre-test loop

(a)  

4.

which one is post-test loop?

a)

while loop

b)

do while

c)

for

5.

which line is not correct?

(a)  

6.

type of the function is

(a)  

7.

which line is the function call?

a)

line 15

b)

line 2

c)

line 10

d)

line 20

8.

which line is needs to be corrected?

(a)  

9.

predict the output for this c code for this segment


while(c<5)

{

printf("ADIN\t");

c++;

}

(a)  

10.

whic loop is not correct?

a)

do {//code}while (condition)

b)

do {//code}while (condition);

c)

do{while(condition); code;}

d)

do {//code}while (condition):