C Function to Check Vowel

How to write a C Function to Check Vowel in C Programming Language ?


Solution:

C Function to Check Vowel

int check_vowel(char a)
{
    if ( a >= 'A' && a <= 'Z' )
       a = a + 'a' - 'A';   /* Converting to lower case */

    if ( a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
       return 1;

    return 0;
}


Learn More :