continue statement in C

• Syntax: continue;
• This statement can be used only in the iteration statements i.e. do, while, and for.
• It causes the transfer of control to the loop continuation part of the loop and re-evaluates the condition.
• This statement has no argument.
• Example:
while (i<=n)
{
if(n%i==0)
{
n=n/i;
continue;
}
i++;
}

No comments:

Post a Comment