C programming tutorial
If statement will execute a block of code when the condition inside if comes to be true.It dont do anything when condition inside if evaluates to false.If else statement will execute a group of statements if condition inside if comes to be true and an another group if condition evaluates to be false.
if(condition)
{
//statements;
}
else
{
//statements;
}
Note: remember ,In an if else statement,only the code associated with if or the code associated with else else executes,never both.