Write a C program to input any alphabet and check whether it is vowel or consonant.

 There are 5 vowel in the English they are (a,e,i,o,u) or (A,E,I,O,U).So we check that if letter is matched with these then it is vowel otherwise it is consonant.


//program to check a alphabet vowel or consonant//
int main()
char c;
printf(“Enter a alphabet”);
if(c==‘a’ || c==‘i’||c==‘e’||c==‘o’||c==‘u’||c==‘A’||c==‘E’||c==‘I’||c==‘O’||c==‘U’)
printf(“alphabet is vowel”);
printf(“alphabet is consonant”);
return 0;


Enter a alphabet
alphabet is vowel

Video solution:-

Recommended Post:

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

Key points:-


Leave a Reply

Your email address will not be published.