#include <stdio.h>
/* Program to check vowel or consonant

Note: The alphabets a,e,i,o,u are vowels and
rest are consonants */
void main()
{
char ch=’A’;
int temp=0;
switch(ch)
{
case ‘a’:
case ‘A’:
case ‘e’:
case ‘E’:
case ‘i’:
case ‘I’:
case ‘o’:
case ‘O’:
case ‘u’:
case ‘U’:
temp=0;
break;
default:
temp=1;
}
if(temp==0){
printf(“It is a vowel.”);

}else{
printf(“It is a consonant.”);
}
}

 

For Life time valid video tutorials of “C Programming For Beginners” course with quiz and certification : Click Here

Downloadable video tutorials of “C Programming For Beginners” for TTRC Player : Click Here