Break, continue and goto statement in C

Break statement

Break statement is used to break the process of a loop (while, do while and for) and switch case.

Example 1

Example 2

 

Continue Statement:

The Continue statement is used to continue the execution of the loop. It is used inside if condition. We can use it with while, do while and for loop.

Syntax:

Let us take an example:

Output

 

Goto  Statement

Goto statement is used to transfer the unconditional program control to a labeled statement.

Syntax:

Example:

Output

Leave a Comment