continue statement in c++ with example

Continue statement tell the compiler to skip the following statement and continue with the next iteration

Syntax:-

continue;

Continue statement in for loop

Here continue causes the control to go to increment section(3rd section in for loop) of the loop than condition statement(2nd section in for loop).

Example:-

c++ program for display even number using continue statement


Continue statement in while and do while loop

Here continue causes the control to go to condition statement of loop.

Example:-

c++ program display odd number using continue statement



Previous Code:-
Break Statement

List Code:-
C++ Codes

Next Code:-


C++ Programs
List of c++ Programs

Leave reply

Add your comments here

Back to Top