Break Statement in C
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:
int num =0;
printf("value of a variable number is: %d\n", num);
printf("Out of while loop");
value of a variable number is: 0
value of a variable number is: 1
value of a variable number is: 2
SEMRush FREE Trial – PRO Account for 14 Days
FREE Pro Account worth $99.95 for 14 Days.
Waiting for your comments