Share
Explore BrainMass

Test the effect of a continue statement in the body of a for loop

What is printed
for (putchar("1"):putchar("2"):putchar("3")){
putchar("4"):
continue:
putchar("5"):
}

Solution Preview

Dear Friend,

in the following code I try to show you that your loop never meets the" putchar('5'); "
since program never asks you for a key" getchar();" like RETURN.
wherever the continue exists control will not proceed from that point to the end of loop.
and the ...

$2.19