C program to check character is vowel is the simple program to check entered character is a vowel or not.
Vowels: In the alphabet, there are 5 vowels A, E, I, O, U and remaining are the consonants. The logic for checking vowels:

Algorithm to check vowel

  1. Take the input character. chr = A
  2. If chr == vowel
    Print character is a vowel.
    Else
    Print character is consonant.

C program to check character is vowel

#include <stdio.h>
#include <conio.h>
void main()
{
char c ; //declare variable
printf ("Enter character :");
scanf ("%c",&c); //take input character
//write condition to check vowel
if(c=='A'||c== 'a'||c=='e'||c=='E'||c=='i'||c=='I'||c=='o'||c=='O'||c=='u'||c=='U')
{
printf ("\n Character is vowel ");
}
else
{
printf ("\n Character is consonant ");
}
getch ();
}

Output:-

C program to check character is vowel

Write A Comment