Explore BrainMass
Share

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

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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

© BrainMass Inc. brainmass.com March 21, 2019, 1:24 pm ad1c9bdddf
https://brainmass.com/computer-science/control-structures/test-the-effect-of-a-continue-statement-in-the-body-of-a-for-loop-95147

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