You might decide that the current loop iteration shouldn't run any more and want to start new iteration right away. This is what continue is for.

You also might decide that the whole loop shouldn't be running anymore, despite the loop condition could still evaluate to true. This is when break comes in handy.

Answer from arrowd on Stack Overflow
๐ŸŒ
W3Schools
w3schools.com โ€บ c โ€บ c_break_continue.php
C Break and Continue
You can also combine break and continue. This example skips printing 2 and stops the loop at 4: int i; for (i = 0; i < 6; i++) { if (i == 2) { continue; } if (i == 4) { break; } printf("%d\n", i); }
๐ŸŒ
Programiz
programiz.com โ€บ c-programming โ€บ c-break-continue-statement
C break and continue
// Program to calculate the sum of numbers (10 numbers max) // If the user enters a negative number, the loop terminates #include <stdio.h> int main() { int i; double number, sum = 0.0; for (i = 1; i <= 10; ++i) { printf("Enter n%d: ", i); scanf("%lf", &number); // if the user enters a negative number, break the loop if (number < 0.0) { break; } sum += number; // sum = sum + number; } printf("Sum = %.2lf", sum); return 0; } ... This program calculates the sum of a maximum of 10 numbers. Why a maximum of 10 numbers? It's because if the user enters a negative number, the break statement is executed.
Discussions

loops - When to use break, and continue in C language? - Stack Overflow
In case of CONTINUE, sometimes ... some statement to get executed, but don't want to break the loop. (For example as given in the link, the requirement is to sum the positive elements of array.In this case you need to skip negative elements, which can be achieved by Continue keyword.) Yes, you can use them both with loop and without loop ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
[deleted by user]
You'll run into different people with strong and competing opinions about a lot of things in this field. I don't use break or continue very often, but there are definitely circumstances where they can make code more clear. You're just going to have to learn the specific rules that this professor wants you to follow, and follow them. More on reddit.com
๐ŸŒ r/learnprogramming
226
561
September 7, 2022
Are break and continue statements that bad?
Opinions vary on this issue. What your teachers have been saying is by no means a universally held opinion -- or even a majority opinion. I teach C++, and I am very fond of the while(true)/break loop. Like this: while (true) { ... if ( ... ) break; ... } I teach this to my students as something that should be a standard part of their personal toolbox. And I think continue is fine, too, although it will not be used as often. People who are against the use of these constructions might argue that they are easily missed. If you have to look at a loop and hunt around for all the places where break or continue are used, then you have a problem. I agree, but I would say the problem is probably that your loop is too long. Make your loop bodies short, and all is well. More on reddit.com
๐ŸŒ r/cpp_questions
28
12
February 28, 2019
Why Does Using A Continue In The Switch Statement Not Cause An Error?
The switch statement is itself in a while loop. The continues will jump back up to the next iteration of the while loop. More on reddit.com
๐ŸŒ r/C_Programming
8
5
August 22, 2024
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ difference-between-break-and-continue-statement-in-c
Difference between break and continue statement in C - GeeksforGeeks
July 23, 2025 - // C program to illustrate the ... the variable j becomes 2. continue statement: This statement skips the rest of the loop statement and starts the next iteration of the loop...
๐ŸŒ
Unstop
unstop.com โ€บ home โ€บ blog โ€บ difference between break and continue in c (+example)
Difference Between Break And Continue In C (+Example)
February 9, 2024 - The break and continue are jump statements that help alter the regular flow of the program. The main difference between break and continue in C is that the former helps exit a loop prematurely, while the latter helps skip the current iteration ...
๐ŸŒ
ScholarHat
scholarhat.com โ€บ home
What is Break & Continue Statement in C with Example
The continue statement is encountered when i=5. So it skips the remainder of the loop's body for that iteration. As a result, it only prints the numbers 1-4 and 6-10, skipping out 5. ... If you remember we already came across the break statement ...
Published ย  August 2, 2025
๐ŸŒ
Hero Vired
herovired.com โ€บ learning-hub โ€บ blogs โ€บ difference-between-break-and-continue-statement-in-c
Difference Between Break and Continue Statement in C
In the example, When num is 5, ... 5. ... The continue statement in C allows us to skip the remaining code inside the loop for the current iteration only, after which the subsequent iteration of the loop is then carried out...
Find elsewhere
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ c-break-and-continue-statements-loop-control-statements-in-c-explained
C Break and Continue Statements โ€“ Loop Control Statements in C Explained
November 4, 2021 - Unlike the break statement, the continue statement does not exit the loop. Rather, it skips only those iterations in which the condition is true. Once the continue; statement is triggered, the statements in the remainder of the loop are skipped.
๐ŸŒ
CS Fundamentals
cs-fundamentals.com โ€บ tech-interview โ€บ c โ€บ difference-between-break-and-continue-in-c-language
Difference Between Break and Continue in C Language
The major difference between break and continue statements in C language is that a break causes the innermost enclosing loop or switch to be exited immediately. Whereas, the continue statement causes the next iteration of the enclosing for, ...
๐ŸŒ
DataFlair
data-flair.training โ€บ blogs โ€บ break-and-continue-statements-in-c
Break and Continue Statements in C - DataFlair
November 20, 2023 - Here, when I become 3, I continue skipping printing 3 and move to the next iteration. Continuing only affects the current iteration. Any remaining iterations may still execute. Multiple continue statements can filter iterations based on different conditions. Break and continue can be combined for additional control over loop execution.
๐ŸŒ
Onlinegdb
learn.onlinegdb.com โ€บ break_and_continue_in_c
break and continue in C | Learn Programming step by step
while (test case) { // codes if ... Example of breakโ€ฆ statement: Continue statement is exactly the opposite of break statement, instead of getting out of the loop like break condition it forces the next iteration of the loop to be executed....
๐ŸŒ
NxtWave
ccbp.in โ€บ blog โ€บ articles โ€บ break-and-continue-statement-in-c
Break and Continue Statement in C โ€“ Syntax, Examples, and Key Differences
Learn how the break and continue statement in C control loop flow. Explore syntax, real-life examples, and key differences to write efficient C programs.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ cprogramming โ€บ c_continue_statement.htm
Continue Statement in C
The behaviour of continue statement ... to the break statement. Instead of forcing the termination of a loop, it forces the next iteration of the loop to take place, skipping the rest of the statements in the current iteration.
๐ŸŒ
Dremendo
dremendo.com โ€บ c-programming-tutorial โ€บ c-break-and-continue-statement
break and continue Statement in C | Dremendo
In the above example, we want to exit from the loop when the value of i is equal to 10. So, we have used a break statement inside the body of if statement which executes when the given condition is true, and the loop terminates. Nested for Loop: We can also use break statement while working with nested loops.
๐ŸŒ
ScholarHat
scholarhat.com โ€บ home
Jump Statements in C: break, continue, goto, return
A jump statement in C language allows a program to alter the normal flow of execution and skip or repeat specific sections of code. The C language has four jump statements: "break," "continue," "return," and "goto."
Published ย  August 2, 2025
๐ŸŒ
Binaryupdates
binaryupdates.com โ€บ home โ€บ break and continue in c programming
Break and Continue in C Programming Language
August 4, 2021 - When the value of i equals to 5, the continue statement takes the control to if statement by passing the value when i==5 inside for loop. This shows that it is possible to skip the rest of the commands in the current loop and start from the top again. Here is an end of this post, we hope now youโ€™re comfortable to work with Break and Continue in C Programming.
๐ŸŒ
BYJUS
byjus.com โ€บ gate โ€บ difference-between-break-and-continue-statement-in-c
Difference Between Break and Continue Statement in C
September 28, 2022 - But they are still different. The primary difference between break and continue statement in C is that the break statement leads to an immediate exit of the innermost switch or enclosing loop.
๐ŸŒ
Algbly
algbly.com โ€บ Tutorials โ€บ C-programming โ€บ C-break-continue.html
C break and continue (with examples)
September 28, 2022 - Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, PHP, Python, Bootstrap, Java and XML.
๐ŸŒ
Henry Harvin
henryharvin.com โ€บ home โ€บ coding blogs | learn more about coding โ€บ what are break and continue statements in c
What are Break and Continue Statements in C
2 weeks ago - This means, that if the specified condition is met, the iteration will be skipped, and the loop proceeds further to the next iteration. ... Similar to the break statement, we use the continue statement inside the loop.
๐ŸŒ
Developerindian
developerindian.com โ€บ articles โ€บ break-and-continue-in-c-language
break and continue in c language
August 4, 2021 - #include <stdio.h> int main() { ... ", i); } return 0; } The continue statement is used to skip the rest of the code inside the loop for the current iteration and move to the next iteration....