Jump to content

C++ Language/ProgramFlow/BreakStatement

From Wikibooks, open books for an open world

This is the current revision of this page, as edited by SoftwareEngineerMoose (discuss | contribs) at 06:49, 21 February 2022 (Created page with "{{C++ Language}} A <code>break</code> statement aborts the execution of a loop. Instead of finishing the remaining statements in the loop's body, program flow immediately jumps to the code that follows the loop (ignoring the loop's condition). # A Break in a Nested Loop # Fallthrough in a Switch {{BookCat}}"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A break statement aborts the execution of a loop. Instead of finishing the remaining statements in the loop's body, program flow immediately jumps to the code that follows the loop (ignoring the loop's condition).

  1. A Break in a Nested Loop
  2. Fallthrough in a Switch