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
What is NULL pointer?
What are the types of data files?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What is the difference between array and linked list in c?
How can a process change an environment variable in its caller?
What are different storage class specifiers in c?
how logic is used
How can I sort more data than will fit in memory?
What is methods in c?
What is function definition in c?
Is c weakly typed?
Is c high or low level?
Why is structure padding done in c?
List a few unconditional control statement in c.
What is #include stdio h and #include conio h?