Table of Contents

C Program to Check Vowel or Consonant

Example
#include <conio.h>

#include <stdio.h>

void main()

{
char ch;

printf("Please Enter an alphabet: \n");
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("\n %c is a VOWEL.", ch);
}
else

{
printf("\n %c is a CONSONANT.", ch);
}
getch();
}
Program Output

       Please Enter an alphabet: g

       g is a CONSONANT.