Nested If-else statement in C

   Nested If-else :

Nested if-else statement means you can use one if-else statement inside the another if-statement. It is used when you want to add conditions in if statement.


  Syntax of Nested If-else statements:


if(condition 1)

{

    if(condition 2)

    {
        //block of statements;
    }
    else
    {
       //block of statements;
    }
}
else
{
    //block of statements;
}
.
.


In above syntax we used if-else statement in the body of another if-statement. It shows the working of  Nested If-else statement.

To explore if-else statements examples and solutions Click Here.

No comments:

Post a Comment

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