YouTip LogoYouTip

C Continue Statement

# C continue Statement [![Image 5: C Loops](#) C Loops](#) The **continue** statement in C works somewhat like the **break** statement. Instead of forcing termination, however, **continue** forces the next iteration of the loop to take place, skipping any code in between. For the **for** loop, the increment expression is still executed after the **continue** statement is executed. For the **while** and **do...while** loops, the **continue** statement causes the program to execute the conditional test again. ## Syntax The syntax for a **continue** statement in C is: continue; !(#) ## Flow Diagram ![Image 7: C continue Statement](#) ## Example ## Example #include int main () { /* local variable definition */ int a =10; /* do loop execution */ do { if( a ==15) { /* skip the iteration */ a = a +1; continue; } printf("value of a: %dn", a); a++; }while( a <20); return 0; } When the above code is compiled and executed, it produces the following result: value of a: 10 value of a: 11 value of a: 12 value of a: 13 value of a: 14 value of a: 16 value of a: 17 value of a: 18 value of a: 19 [![Image 8: C Loops](#) C Loops](#) AI is thinking... [](#)(#) (#)[](#) [Volcano Engine Coding Plan supports mainstream large models such as Doubao, GLM, DeepSeek, Kimi, MiniMax, etc. Official direct supply, stable and reliable. Configuration Guide Β₯9.9/ month Activate Now](https://maas.xfyun.cn/modelSquare?ch=maas_lm_l2E)
← Python3 Func Number CeilPython3 Func Number Abs β†’