Check vowel in C program by R4R Team

What is Vowel :
The alphabet {A,E,I,O,U} and {a,e,i,o,u} is known as vowels.
Other then this alphabet are known as consonant.

program-

#include< stdio.h>
int main() {
char s;
printf("Enter alphabet\n");
scanf("%c",&s);
if(s=='A'||s=='E'|| s=='I' || s=='O' || s=='U'|| s=='a'||s=='e'|| s=='i' || s=='o' || s=='u')
printf("It is vowel");
else
printf("It is consonant");

}


output-

Enter alphabet
A
It is vowel

Enter alphabet
i
It is vowel

Enter alphabet
f
It is consonant

-In this program, we take an input of any alphabet and check whether it is vowel or not.
- We just pass that variable in if() condition, as shown in abobve program,
-if this condition is true then it is vowel other it is consonant.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!