C continue statementThe 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. Syntax:Continue statement example 1Output infinite loop Continue statement example 2Output 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 loopIn 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 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 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India