C Program to Check whether Character is Vowel or Consonant

Q. Write C Program to check whether inputted character is vowel or not as well to check character is consonant or not.

What is vowel? and What is Consonant?

Vowels are : a, e, i, o, u

Consonants are : Other characters like d, s, m, n

Following program checks whether given alphabet is vowel or consonant.

Source Code:

#include<stdio.h>
#include<conio.h>
#include<string.h>

int main()
{
	char ch;
	clrscr();
	printf("nn Enter Character : ");
	scanf("%c",&ch);
	if(ch=='a' || ch=='e' || ch=='o' || ch=='i'|| ch=='u' || ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U')
		printf("nn Given character is Vowel !");
	else
		printf("nn Given character is Consonant !");
	getch();
	return 0;
}

Output:

Check Vowels or Consonants

Fig. : Check Vowels or Consonants in C

Download Now (.Zip File – 19 KB)…

Similar Programs:

How to Count Total Number of Vowels and Consonants in String in C

2 Comments

  1. Bhavesh says:

    thanks for sharing this post, this post helped me so much, yesterday i am in my practical exam and how ques is
    Q. Write C Program to check whether inputted character is vowel or not as well to check character is consonant or not. that time i have my mobile so i search on google then i saw your site and after that i copy post from you site so one more time really thanks,,,,,!!!!!!
    Bhavesh recently posted..Creative Technology – Charge Your Battery By Waste Paper, Internet Will Work Faster Than BeforeMy Profile

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.