C Program to check whether character is vowel or not

By | 02.11.2016

Check whether character is vowel or not


Write a C Program to check whether character is vowel or not using switch statement. Here’s simple Program to check whether character is vowel or not using switch statement in C Programming Language.


Below is the source code for C Program to check whether character is vowel or not using switch statement which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :


/*  C Program to check whether character is vowel or not using switch statement  */

#include<stdio.h>

int main()
{
  char ch;
  printf("Enter a character to check :: ");
  scanf("%c",&ch);
  switch(ch)
  {
  case 'a':
         printf("\nThe entered character %c is a vowel",ch);
         break;
  case 'e':
         printf("\nThe entered character %c is a vowel",ch);
         break;
  case 'i':
         printf("\nThe entered character %c is a vowel",ch);
         break;
  case 'o':
         printf("\nThe entered character %c is a vowel",ch);
         break;
  case 'u':
         printf("\nThe entered character %c is a vowel",ch);
         break;
  default:
         printf("\nThe entered character %c is a consonant",ch);
  }

  return 0;
}

OUTPUT : :


/*  C Program to check whether character is vowel or not using switch statement  */

---------------------------------------------------

Enter a character to check :: s

The entered character s is a consonant

---------------------------------------------------

Enter a character to check :: i

The entered character i is a vowel

---------------------------------------------------

Enter a character to check :: a

The entered character a is a vowel

Above is the source code for C Program to check whether character is vowel or not using switch statement which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post….

4.7 3 votes
Article Rating
Category: Basic Programs C Programming Tags:

About Tunde A

My name is Tunde Ajetomobi, a Tech Enthusiast and Growth Hacker. I enjoy creating helpful content that solves problem across different topics. Codezclub is my way of helping young aspiring programmers and students to hone their skills and find solutions on fundamental programming languages.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments