LearnFrenzy
Sign in Take a free test

Control Flow Statements · Control Flow MCQ · Question 12

What does a labelled break do? Answer, explanation & discussion

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

In nested loops, what does break outer; do, where outer labels the outer loop?

  • A Leaves only the inner loop
  • B Leaves the outer loop (and therefore both loops) Correct
  • C Jumps to the label and restarts
  • D Compile error
Correct Answer: Option B

continue outer would move to the next iteration of the outer 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