Break Statement in C

Break Statement in C

by Yogesh Khanna 23-Aug-18

0 1310

The break statement in C language is used inside loops and switch case.

First, take a look at inside a loop usage: -  When the break statement is encountered inside a loop, the loops are terminated and the control resumes on the next loop.

Secondly, In case of switch case control structure, the control comes out of the switch case.

The syntax of break statement in C program is as follows:


The example of break statement in c program is as follows:

#include <stdio.h>
int main()
int num =0;
printf("value of variable number is: %d\n", num);
if (num==2)
printf("Out of while loop");
return 0;


value of variable number is: 0
value of variable number is: 1
value of variable number is: 2


Discount Coupons

Leave a Reply

    Waiting for your comments