Operator Break

Top 

 

Syntax:

break;

Stops execution of the nearest nested external operator switch, while, do, or for. Control is transferred to the operator following the operator being completed. One purpose of this operator is to complete the cycle, when specific value is assigned to the variable.

Example:

     for (i = 0; i < n; i++)

       if (a[i] == 0)

          break;