Computer Science, asked by abdulhannankhan61866, 4 months ago

what is purpose of break statement​

Answers

Answered by sahumanoj0331
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 chraxanomar28
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