Break Statement in C Programming

Posted on

Break-Proceed

Break Assertion in C

 

Break assertion are used for terminates any sort of loop e.g, whereas loop, do whereas loop or for loop. The break assertion terminates the loop physique instantly and passes management to the subsequent assertion after the loop. In case of internal loops, it terminates the management of internal loop solely.

Use break assertion

Break assertion are primarily used with loop and change assertion. usually use the break assertion with the if assertion.

  • with loop assertion
  • with change case
  • with if assertion

Syntax

Instance of break

Clarification:Within the above code when consumer enter any character, if the consumer enters E or e, the break assertion terminates the whereas loop and management is handed to the assertion after the whereas loop that shows the Good bye !message.

Output


Proceed Assertion in C

 

C Proceed assertion are used to skips the remainder of the present iteration in a loop and returns to the highest of the loop. The proceed assertion works like a shortcut to the top of the loop physique.

Use break assertion

Syntax

Instance of proceed

Output