if-else Statement


Where if the evaluation inside the parenthesis is TRUE (nonzero) the statements inside the block will be executed else the other code block will be executed.

Single statement execution

if (expression)
	statement_TRUE;
else
	statement_FALSE;

Multiple statement execution

if (expression){
	statement__1;
	statement__2;
}
else{
	satement_3;
	statement_4;
}

if_else_diagram.png


Some examples