The if..else statement is an extension of the simple if statement.the following syntax is if..else.
if(true condition)
{
true statement
}
else
{
false statement
}
the above syntax if expression is true then true block is execute otherwise false block is execute in this if..else statement.
Example
#include<stdio.h>
#include<conio.h>
void main()
{
int age;
clrscr();
printf("Enter Your Age:");
scanf("%d",&age);
if(age = > 18)
{
printf("You are Eligible for Vot")
}
else
{
printf("You are Not Eligible for Vot");
}
getch();
}