What will be printed if the following code is executed?
void main()
{
int x=0;
for( ; ; )
{
if( x++ == 4 ) break;
continue;
}
printf("x=%d", x);
}
void main()
{
int x=0;
for( ; ; )
{
if( x++ == 4 ) break;
continue;
}
printf("x=%d", x);
}
A. x=0
B. x=5
C. x=4
D. x=1
E. Error
Answer: Option B
Give me proper explanation about this question