C Program to check whether character is vowel or not

By | November 2, 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….

Leave a Reply