Menu
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

C continue Keyword

❮ C Keywords


Example

Skip the iteration if the variable i is 4, but continue with the next iteration:

int i;

for (i = 0; i < 10; i++) {
  if (i == 4) {
    continue;
  }
  printf("%d\n", i);
}
Try it Yourself »

Definition and Usage

The continue keyword is used to end the current iteration in a for loop (or a while loop), and continue to the next iteration.


Related Pages

Use the break keyword to break out of a loop.

Read more about for loops in our C For Loop Tutorial.

Read more about while loops in our C While Loop Tutorial.

Read more about break and continue in our C Break/Continue Tutorial.


❮ C Keywords