-
Which of the following is the correct output for the program given below?
#include <stdio.h>
int main ( )
{
int a = 0;
for (; a < 5 ; a++);
printf ("%d\n", a);
return 0;
}
-
- 0 1 2 3 4
- 5
- 1 2 3 4
- 6
Correct Option: B
There is a semicolon after for loop. So its a empty loop.
finally after the execution of loop, the value of a = 5