Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

ISRO | ISRO CS 2011 | Question 63

  • Last Updated : 11 May, 2018

What is the output of the following C code?

int main()
int index;
for(index=1; index<=5; index++)
printf("%d", index);
if (index==3)

(A) 1245
(B) 12345
(C) 12245
(D) 12354

Answer: (B)

Explanation: The continue statement forces the loop to continue or execute the next iteration. When the continue statement is executed in the loop, the code inside the loop following the continue statement will be skipped and next iteration of the loop will begin.

In this code, continue statement do not contain any loop or statement so basically there would be no effect on the execution of the program.
So, the code will print 12345.

Option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!