cpp/language/break

Causes the enclosing, , or  loop or  to terminate.

Used when it is otherwise awkward to terminate the loop using the condition expression and conditional statements.

Explanation
After this statement the control is transferred to the statement immediately following the enclosing loop or switch. As with any block exit, all automatic storage objects declared in enclosing compound statement or in the of a loop/switch are destroyed, in reverse order of construction, before the execution of the first line following the enclosing loop.