- if Statement
- if…else Statement
An if statement can be followed by an optional else statement, which executes when the Boolean expression is false.Syntax
The syntax of an if...else statement in C programming language is:
- if...else if...else Statement
An if statement can be followed by an optional else if...else statement, which is very useful to test various conditions using single if...else if statement.Syntax
- Nested if Statements
It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement(s).Syntax
The syntax for a nested if statement is as follows:

- Switch Statement
A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case.Syntax
The syntax for a switch statement in C programming language is as follows: