Q:

C program to find whether given character vowel or not

0

C program to find whether given character vowel or not

What is Vowel?

 

 

 

The characters such as ‘a’, ‘e’, ‘i’, ‘o’, ‘u’ are called vowels.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 
#include <stdio.h>
 
int main()
 
{
 
     char c;
 
     printf("Please enter a character\n");
 
     scanf("%c", &c);
 
 
 
     if (c == 'a' || c == 'A' || c == 'e' || c == 'E' || c == 'i' || c == 'I' || c =='o' || c=='O' || c == 'u' || c == 'U')
 
         printf("\nThe entered character %c is a vowel.\n", c);
 
     else
 
         printf("\nThe entered character %c is not a vowel.\n", c);
 
 
 
     return 0;
 
}

Output:

Please enter a character

a

The entered character a is a vowel.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now