C continue statement
The continue statement in C language is used to bring the program control to the beginning of the loop. The continue statement skips some lines of code inside the loop and continues with the next iteration. It is mainly used for a condition so that we can skip some code for a particular condition.
Continue statement example 1
Continue statement example 2
1 2 3 4 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.
1 1 1 2 1 3 2 1 2 3 3 1 3 2 3 3
As you can see, 2 2 is not printed on the console because inner loop is continued at i==2 and j==2.
Next TopicC goto statement
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week