May 21, 2020

Neasted If-else statement in C

Neasted 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 Neasted 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 is shows the working of  Neasted If-else statement.

Share This:    Facebook Twitter

0 comments:

Post a Comment

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