In this tutorial you will learn about the C If Else If Ladder Statement and its application with practical example.
The c if else if ladder statement is an extension of the if-else statement.
The if-else if ladder statement allows us to add an alternative set of test conditions in the if-else statement using the else-if statement.
if-else if ladder statement Syntax
Syntax:-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
if(condition1) { // statement(s) } else if(condition2){ // statement(s) } ... ... else if(conditionN){ // statement(s) } else { // statement(s) } |