25/12/2016

C Program To Find Character Is Vowel Or Not

Program :- Write a C Program To Find Character Is Vowel Or Not .In English Language there are only 5 Vowel's and rest are Consonants . your task is to check Entered character is vowel or not

Logic :- we know in English Language there are only 5 Vowel's and rest are consonants vowels Are A,E,I,O,U Or a,e,i,o,u  And Consonants Are B,C,D,F,G,H,J,K,L,M,N,P,Q,R,S,T,V,W,X,Y,Z Or
b,c,d,f,g,h,j,k,l,m,n,p,q,r,s,t,v,w,x,y,z So now we have to just check and match that character to given vowels

See Also :- Java Program To Find Character Is Vowel Or Not

Solution :- 

#include<stdio.h>
int main()
{
/*Program By Ghanendra Yadav
   Visit http://www.programmingwithbasics.com/
  */

  char a ;
 
printf("Enter The Character You Want Check Vowel or Not\n\n");
  scanf("%c",&a);
 
if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u'||a=='A'||a=='E'||a=='I'||a=='O'||a=='U')
  {
  printf("Character is Vowel \n");
  }
  else
  {
  printf("Character is Not Vowel\n\n");
}
 return 0;
}

See Also :- C++ Program To Find Character Is Vowel Or Not

Output:-


C Program To Find Character Is Vowel Or Not

Previous Post
Next Post

post written by:

Hi, I’m Ghanendra Yadav, SEO Expert, Professional Blogger, Programmer, and UI Developer. Get a Solution of More Than 500+ Programming Problems, and Practice All Programs in C, C++, and Java Languages. Get a Competitive Website Solution also Ie. Hackerrank Solutions and Geeksforgeeks Solutions. If You Are Interested to Learn a C Programming Language and You Don't Have Experience in Any Programming, You Should Start with a C Programming Language, Read: List of Format Specifiers in C.
Follow Me

0 Comments: