- Posts: 3
- Joined: Wed Apr 28, 2021 8:26 am
- break without a label, can occur only in a switch, while, do, or for statement.
even the explanation says :
A break statement with no label attempts to transfer control to the innermost enclosing switch, while, do, or for statement; this statement, which is called the break target, then immediately completes normally. If no switch, while, do, or for statement encloses the break statement, a compile-time error occurs.
- Site Admin
- Posts: 9480
- Joined: Fri Sep 10, 2010 9:26 pm
Users browsing this forum: No registered users and 1 guest