Programming Languages
C
Objective
Jan 02, 2013
int i = 4;
switch (i)
{
default: ;
case 3:
i += 5;
if ( i == 8)
{
i++;
if (i == 9) break;
i *= 2;
}
i -= 4;
break;
case 8:
i += 5;
break;
}
printf("i = %d\n", i);
What will the output of the following program ?
Detailed Explanation
The output of the program is 5.
So the answer is c.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts