Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are terms in math?

1029


What is extern c used for?

1042


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2053


What is the right way to use errno?

1037


What are the advantages and disadvantages of a heap?

1196


Tell us something about keyword 'auto'.

1055


explain what is fifo?

1059


What is echo in c programming?

1003


What is the use of c language in real life?

1006


What is the correct code to have following output in c using nested for loop?

1065


explain what is an endless loop?

1071


Where in memory are my variables stored?

1167


Describe the modifier in c?

1088


What is the difference between class and object in c?

1154


What are the applications of c language?

1057