C continue statement
- The continue statement in C language is used to continue the execution of loop (while, do while and for). It is used with if condition within the loop.
- In case of inner loops, it continues the control of inner loop only.
Syntax:
The jump statement can be while, do while and for loop.
Example of continue statement in c
Output
1
2
3
4
5
6
7
8
9
10
As you can see, 5 is not printed on the console because loop is continued at i==5.
C continue statement with inner loop
- In such case, C continue statement continues only inner loop, but not outer loop.
Output
1 1
1 2
1 3
2 1
2 3
3 1
3 2
3 3
Tags:
C programming
C Programming Language
Continue statement
manjeet singh kuthar
mskuthar
www.mskuthar.blogspot.com