If-else Statement
The if-else statement is used to perform two operations for a single condition. The if-else statement is an extension to the if statement using which, we can perform two different operations, i.e., one is for the correctness of that condition, and the other is for the incorrectness of the condition. Here, we must notice that if and else block cannot be executed simiulteneously. Using if-else statement is always preferable since it always invokes an otherwise case with every if condition. The syntax of the if-else statement is given below.
Flowchart of the if-else statement in C

Let's see the simple example to check whether a number is even or odd using if-else statement in C language.
Output
enter a number:4 4 is even number enter a number:5 5 is odd number
Program to check whether a person is eligible to vote or not.
Output:-Enter your age?18 You are eligible to vote... Enter your age?13 Sorry ... you can't vote