CHAPTER 14 / 26

C Break & Continue

Learn how break and continue control loop execution.

01 — Syntax

break;\ncontinue;

02 — Example

#include <stdio.h>

int main() {
    for (int i = 1; i <= 10; i++) {
        if (i == 6) break;
        printf("%d ", i);
    }

    return 0;
}

03 — Important Points

04 — Common Mistakes

05 — Real-World Use

Break and continue are useful for controlling search and filtering loops.

06 — Practice

Create a small program that demonstrates the main idea of C Break & Continue.

▶ Try It Yourself← PreviousNext →All Chapters