to get a line of text and count the number of vowels in it
Answer Posted / chandra sekhar kommuri
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char st[100];
int i,count=0;
clrscr();
printf("Enter line of text:");
gets(st);
for(i=0;st[i]!='\0';i++)
switch(st[i])
{
case 'a':
case 'A':
case 'e':
case 'E':
case 'i':
case 'I':
case 'o':
case 'O':
case 'u':
case 'U':count++;
}
printf("\n Number of vowels:%d",count);
getch();
}
| Is This Answer Correct ? | 75 Yes | 24 No |
Post New Answer View All Answers
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What happens if a header file is included twice?
what will be maximum number of comparisons when number of elements are given?
Explain what is a 'locale'?
Write a Program to accept different goods with the number, price and date of purchase and display them
What are keywords c?
What is the purpose of realloc()?
What is LINKED LIST? How can you access the last element in a linked list?
Why are algorithms important in c program?
Why we use int main and void main?
How to write c functions that modify head pointer of a linked list?
What is the value of uninitialized variable in c?
How pointers are declared?
What do you mean by dynamic memory allocation in c? What functions are used?
Whats s or c mean?