Thursday, 16 August 2012

Function to check vowel

int check_vowel(char a)
{
    if (a >= 'A' && a <= 'Z')
       a = a + 'a' - 'A';   /* Converting to lower case or use a = a + 32 */
 
    if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
       return 1;
 
    return 0;
}

No comments:

Post a Comment