continue Statement in C

The continue statement when encountered, transfers the control to the condition of the while loop or counter-modification statement of for loop. This means all the statements of loop body after the continue statement are skipped and the control is directly transferred to the condition of the while loop or counter-modification statement of for loop. Program 1 shows the working of continue statement followed by the output.

#include <stdio.h>
void main()
{
int num, count;
printf(“Enter the number? ”);
scanf(“%d”, &num);
for( count=1; count < 10; count++)
{
if (num == count)
continue;
printf(“Number %d/10 display\n”,
count);
}
}

Program 1: Program to show the working of continue statement.

Screenshot from 2020-07-16 16-52-50