Define The if - else - if Statement - Computer Programming?
The universal form is
if (expression 1)
{
Statements 1;
}
else if(expression 2)
{
Statements 2;
}
else
{
Statements 3;
}
Once a true condition has occurred, the statement associated with it gets executed and rest of the ladder will not be executed and If no true condition is found, the control will come to the final else statement.