Need Of Continue Statement In C - Log2Base2
Maybe your like
Continue statement is used in looping to skip some statements.
It is used inside loop along with the decision-making statements.
When continue statement encounters, the execution will go to the starting of the loop.
The statements below continue statement will not be executed, if the given condition becomes true.
Example
Print number continuously from 1 to 100 except 25,50 and 75.
In this program, we should print numbers from 1 to 100 using for loop but when the number is equals to 25 or 50 or 75, we should give continue statement.
Program
Example
#include<stdio.h> int main() { int i; for(i=1;i<=100;i++) { if(i == 25 || i == 50 || i == 75) continue; printf("%d\n",i); } return 0; } Run itIf we run the above program, it will print numbers from 1 to 100 except the numbers 25,50 and 75.
Pictorial Explanation
Page -- Page ++ Tag » What Does Continue Do In C
-
Continue Statement In C - Tutorialspoint
-
Continue Statement (C) - Microsoft Learn
-
C Break And Continue - Programiz
-
C Continue Statement - Javatpoint
-
C - Continue Statement With Example
-
Continue Statement In C/C++ - GeeksforGeeks
-
C Break And Continue - W3Schools
-
Continue Statement
-
Why Do We Use The Continue Statement In C? - Quora
-
What Is A Continue Statement In C Programming? - Quora
-
Continue Statement In C Programming Language - Codeforcoding
-
C Break And Continue Statements – Loop Control ... - FreeCodeCamp
-
Use Of Continue In C Programming - Aticleworld
-
C Programming Break And Continue Statements - Trytoprogram