Break Continue statements in C

Repeatedly execute a block of code using the loop control statements. The following are the loop control statements in C Language:

  • break statement
  • continue statement

Before moving further, we’ve prepared a video tutorial to understand what are break and continue statements in C:

break Statement

Use the break statement, if you want to jump out of a loop. The control passes to the first statement after the loop since the break statement terminates the loop.

The syntax for bthe reak statement:

Example

The following is an example showing the usage of the break statement in C language,

The following is the output showing the usage of the break statement in C Language,

C Programming break statement

continue statement

Use the continue statement if you want to pass control to the next iteration of the loop. However, it skips any code in between.

The syntax for cthe ontinue statement in C language,

The following is an example showing the usage of the continue statement,

The following is the output,

C Programming continue statement

In this lesson, we learned how to work with loops in C Language. We saw the implementation of the while loop, do-while loop, for loop, break statement, and continue statement.

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others:


For Videos, Join Our YouTube Channel: Join Now


Read More:

C Programming Cheat Sheet
Loops in C Programming
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment