to get a line of text and count the number of vowels in it
Answer Posted / anil kumar nahak
void main()
{
char *st;
int i=0,c=0;
printf("\n Enter A String:");
gets(st);
while(st[i]!='\0')
{
if(st[i]=='a' || st[i]=='A' || st[i]=='e' || st[i]=='E'
st[i]=='i' || st[i]=='I' || st[i]=='o' st[i]=='O' st[i]=='u'
|| st[i]=='U')
c++;
i++;
}
printf("\n the Number Of Vowels Present In The String Is :
%d",c);
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
how to find anagram without using string functions using only loops in c programming
Explain what are multidimensional arrays?
Subtract Two Number Without Using Subtraction Operator
Suggesting that there can be 62 seconds in a minute?
What is an endless loop?
How can I change the size of the dynamically allocated array?
What is I ++ in c programming?
When should you not use a type cast?
What is the use of bitwise operator?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
Explain what is the concatenation operator?
How can I direct output to the printer?
Does sprintf put null character?
What is a floating point in c?
What are pointers really good for, anyway?