The if-else Statement

The if statement by itself will execute a single statement, or a group of statements, when the expression following if evaluates to true. It does nothing when the expression evaluates to false. Can we execute one group of statements if the expression evaluates to true and another group of statements if the expression evaluates to false? Of course! This is what is the purpose of the else statement that is demonstrated in the following example:

#include<stdio.h>
int main()
{
    int a = 10;
    if(a>10)
           printf("a is greater than 10\n");
    else
           printf("a is less than or equal to 10");
           
    getchar();
    return 0;
}