Unconditional statements in C
In C, an unconditional statement is a statement that is executed without any condition or consideration of whether a particular condition is true or false. Unconditional statements are executed sequentially, one after the other, and they do not depend on any conditional logic.
Here are some common examples of unconditional statements in C:
1. Break Statement: In a loop or switch statement, the break
statement is used to exit the loop or switch block. It is executed unconditionally when encountered.
OUTPUT:-
2. Continue Statement: In a loop, thecontinue
statement is used to skip the current iteration and move to the next iteration. It is executed unconditionally when encountered.
OUTPUT:-
3.GOTO Statement:-It is used to jump the control from one statement to another statement.
OUTPUT:-
Unconditional statements are fundamental building blocks in C programming and are used to perform various operations, including initialization, assignment, function calls, and control flow manipulation. They are executed in the order in which they appear in the code, without any condition controlling their execution.