Jump Statements in C: break, continue, goto, return
What are Jump Statements?
Jump statements transfer control from one part of the program to another unconditionally.
break
Exits the nearest enclosing loop or switch immediately.
continue
Skips the rest of the current loop iteration and moves to the next one.
goto
Transfers control to a labeled statement elsewhere in the function.
goto end;
printf("Skipped");
end:
printf("Reached label");
return
Exits a function, optionally returning a value to the caller.
int square(int n) {
return n * n;
}
PreviousTernary Operator in C: Ternary Operator vs. if...else Statement
Next Continue Statement in C: What is Break & Continue Statement in C with Example
Ready to master real-world C Programming development?
Learn C Programming hands-on with mentor-led, live sessions.
.png)