In this C program, we will learn how to find whether an alphabet is vowel or not using switch case statement. A vowel is the alphabets that represents a speech sound created by the relatively free passage of breath through the larynx and oral cavity. Letters that are not vowels are consonants.
English has five proper vowel letters (A, E, I, O, U) all alphabets except these characters are consonants.
English has five proper vowel letters (A, E, I, O, U) all alphabets except these characters are consonants.
Required Knowledge
C program to check whether a character is vowel or consonant using switch statement
#include <stdio.h> int main() { char c; printf("Enter an Alphabet\n"); scanf("%c", &c); switch(c) { case 'a': case 'A': case 'e': case 'E': case 'i': case 'I': case 'o': case 'O': case 'u': case 'U': printf("%c is VOWEL", c); break; default: printf("%c is CONSONANT", c); } return 0; }Output
Enter an Alphabet e e is VOWEL
Enter an Alphabet Z Z is CONSONANT
Related Topics