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
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
what is a function method?give example?
Who invented bcpl language?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What is typedef?
What is the purpose of scanf() and printf() functions?
largest Of three Number using without if condition?
Can we initialize extern variable in c?
What are the features of the c language?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What is clrscr in c?
what do the 'c' and 'v' in argc and argv stand for?
What does != Mean in c?
What is meant by operator precedence?