Open In App

ISRO | ISRO CS 2011 | Question 63

What is the output of the following C code?

#include 
int main()
{
int index;
for(index=1; index

(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



Article Tags :