Header Ads Widget

C program to check a given character is vowel or consonant

Here in this post we will check that the given character is vowel or not . So first we have to know that what is vowel and consonant . the characters (a,e,i,o,u , A,E,I,O,U) are vowel and rest of the characters are consonants. 

C program to check given character is vowel or not:-

Code:-

#include<stdio.h>
int main()
{
char ch;
printf("Enter any character: ");
scanf("%c",&ch);
if((ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u')
|| (ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U'))
printf("The character is vowel");
else
printf("The character is consonants");

return 0;

}
Output:-

Enter any character: t
The character is consonants



C program to check a given character is vowel or not:-

 ,c program to check whether a character is vowel or consonant,

,c program to check whether an alphabet is vowel or consonant using switch case,

,c program to check whether an alphabet is vowel or consonant using if else,

,write a program to determine whether the input character is a vowel or consonant or not an alphabet,

,write a program to check whether the given character is vowel or consonant in java,

,write a program to check whether a character is vowel or consonant in python,

,vowel program in c,

,write a program to check whether a character is vowel or consonant in python,

,write a program to determine whether the input character is a vowel or consonant or not an alphabet,

,write a program to check whether the given character is vowel or consonant in java,

,vowel program in c,

,c program to check whether an alphabet is vowel or consonant using switch case,

,c program to check whether a character is vowel or consonant,



Recommended Post:

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-