n if statement can be followed by an optional else statement, which executes when the boolean expression is false.
The syntax of an if…else statement in C programming language is:
/* statement(s) will execute if the boolean expression is true */
/* statement(s) will execute if the boolean expression is false */
If the boolean expression evaluates to true, then the if block of code will be executed, otherwise else block of code will be executed.
C programming language assumes any non-zero and non-null values as true, and if it is either zero or null, then it is assumed as false value.