In the C programming language, the continue statement works slightly similar to the break statement. The continue restarts the loop with the next value of the item. All the line code below continue statement is skipped.
In the for loop, continue statement skips the test condition and increment value of the variable to execute again and In the while and do…while loops, continue skips all the statements and program control goes to at the end of the loop for tests condition.
using namespace std;
/* skip the iteration */
cout<<"line "<<i<<"is executed\n";
cout<<"\nLine - 5 skip the iteration";
line 2is executed
line 3is executed
line 4is executed
line 6is executed
line 7is executed
Line - 5 skip the iteration