LearnFrenzy
Sign in Take a free test

C Loops · Loops MCQ · Question 3

Where does continue jump to in a for loop? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 3 Back to Exercise

In a for loop, where does continue transfer control?

  • A To the start of the body
  • B To the update expression, then the condition Correct
  • C Out of the loop
  • D To the initialisation
Correct Answer: Option B

continue ends the current pass. In a for loop the update (i++) still runs, then the condition. In a while loop it jumps straight to the condition – which is why a continue before the increment of a while loop can cause an infinite loop.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links