C Exercises

Jul 14, 2020

What is Break Statement in C

Break statement is very useful to exit from any loop  such as for loop, while loop and do while loop. When the break statement is encountered in the loop then the loop will stop running the statements and immediately exit from the loop.

  Syntax of Break Statement in C :

  Example program of break statement:

void main()
 int i;

     printf("%d ",i);

In above program we have used break statement. When break statement encounter's program exit's the loop and it will print the following output:

Break Statement in C, what is break in C

No comments:

Post a Comment

If you have any doubts, please discuss here...👇