MCS-011 Problem Solving and Programming

First year, Semester 1

Chapters

Newsletter

The break Statement

Sometimes, it is required to jump out of a loop irrespective of the conditional test value. Break statement is used inside any loop to allow the control jump to the immediate statement following the loop. The syntax is as follows:

break;

When nested loops are used, then break jumps the control from the loop where it has been used. Break statement can be used inside any loop i.e., while, do-while, for and also in switch statement
  

Report an issue

Reporting: The break Statement (topic)

Related Posts