Explore BrainMass
Share

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

This content was STOLEN 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 October 24, 2018, 8:23 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
See Also This Related BrainMass Solution

Environmental Psychology: Strategies, utilizing technology, to manage public congestion & environmental stressors

I need resources so I can discuss strategies, utilizing technology, to manage weather, public congestion of the environmental stressors.

View Full Posting Details