This code checks whether an input alphabet is a vowel or not. Both lower-case and upper-case are checked.
C programming code
Output of program:
Check vowel using switch statement
Function to check vowel
This function can also be used to check if a character is a consonant or not, if it’s not a vowel then it will be a consonant, but make sure that the character is an alphabet not a special character.