If-Else-If statement in C

   If-else-if Statement:


In C if-else-if ladder is used to decide from among multiple options. 
It means if-else-if ladder is a way of putting multiple if's together, So by using it we can check multiple conditions.


  Syntax of if-else-if ladder:


if(condition 1)

{
     //block of statements;
}
else if(condition 2)
{
    //block of statements;
}
else if(condition 3)
{
    //block of statements;
     .
     .
     //upto n statements;

}
else
{
    // default statement;
}


Above syntax shows the working of if-else-if ladder in C programming language.

To explore if -else statements examples Click Here.


No comments:

Post a Comment

If you have any doubts, please discuss here...👇