C Programs - Conditional
In C language, statements are executed sequentially.
But sometimes we want to execute some part of our code conditionally or we need to make decision based on some condition.
In C language following types of conditional statements can be used:
- if statement
- if-else statement
- if-else ladder
- Nested if-else statement
- switch statement
In this section, we will try programs based on conditional statements mentioned above.