if Statement in C


An if statement consists of a Boolean expression followed by one or more statements.

Source Code

//if statement
 
int main()
{
    char name[10];
    int age;
    printf("\nEnter Your Name : ");
    scanf("%s",name);
    printf("\nEnter The Age : ");
    scanf("%d",&age);
    if(age>=18)
    {
        printf("\n %s  age is %d Eligible For Vote",name,age);
    }
    return 0;
}
 
 
To download raw file Click Here

List of Programs


Sample Programs


Switch Case in C


Conditional Operators in C


Goto Statement in C


While Loop Example Programs


Looping Statements in C

For Loop Example Programs


Array Examples in C

One Dimensional Array


Two Dimensional Array in C


String Example Programs in C


Functions Example Programs in C


Learn All in Tamil © Designed & Developed By Tutor Joes