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
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
what are non standard function in c
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Why we use void main in c?
What is a struct c#?
Explain what is the benefit of using enum to declare a constant?
Explain how can I avoid the abort, retry, fail messages?
What are the data types present in c?
What is meant by type specifiers?
What are loops c?
Write a program to know whether the input number is an armstrong number.
How many types of operator or there in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Explain what is the difference between the expression '++a' and 'a++'?
In c programming language, how many parameters can be passed to a function ?