C Programming MCQ

1:

The following program fragment

for (i = 1; i< 5; ++ i )
if ( i == 3) continue;
else printf( " %d " i );


results in the printing of

A.

1 2 4 5

B.

1 2 4

C.

2 4 5

D.

none of the above

 

Answer : B

Explanation :

The use of continue statement forces the execution to skip the remainder of the current pass over the loop and initiates the next. If ' U ' is 3. print f statement will be skipped. Hence the answer is b

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.