C++ continue statement

In the break statement tutorial we have seen the way by using which we can terminate the loop whenever require. Similarly we can use continue statement to skip the part of the loop.

C++ continue statement :

The continue statement forces the next iteration of the loop to take place, skipping remaining code in between.

In the case of the for loop as soon as after the execution of continue statement, increment/decrement statement of the loop gets executed. After the execution of increment statement, condition will be checked.

In case of the while loop, continue statement will take control to the condition statement.

In case of the do..while loop, continue statement will take control to the condition statement specified in the while loop.