what is purpose of break statement
Answers
Answered by
0
Answer:
The break statement terminates the execution of the nearest enclosing do , for , switch , or while statement in which it appears. Control passes to the statement that follows the terminated statement.
Answered by
0
break statement
It is used to come out of the loop instantly. When a break statement is encountered inside a loop, the control directly comes out of loop and the loop gets terminated. It is used with if statement, whenever used inside loop. This can also be used in switch case control structure. Whenever it is encountered in switch-case block, the control comes out of the switch-case
Similar questions