Wednesday

NESTED IF


NESTED IF

If within if is called nested if and it is used when we have multiple conditions to check and when any if condition contains another if statement then that is called ‘nested if’.
If the external condition is true, then the internal if condition or condition are executed and if the condition is false then the else portion is executed of the external if statement

SYTAX

if (condition)
{
…….
…….
}
if (condition)
{
…….
…….
}
else if (condition)
{
…….
…….
}
else if (condition)
{
…….
…….
}
else
{
…….
……. }
}
else
{
…….
…….
}


Kindly Bookmark this Post using your favorite Bookmarking service:
Technorati Digg This Stumble Stumble Facebook Twitter
YOUR ADSENSE CODE GOES HERE

0 comments:

Post a Comment

Dont Forget for Commets

 

| C programing tutorials © 2009. All Rights Reserved | Template Style by My Blogger Tricks .com | Design by Brian Gardner | Back To Top |