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 the types of assignment statements?

1032


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3524


What is the difference between procedural and declarative language?

1111


Can a variable be both constant and volatile?

1069


Why void is used in c?

977


Write a program to swap two numbers without using third variable?

1259


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

1036


How does normalization of huge pointer works?

1121


Explain do array subscripts always start with zero?

1196


What does sizeof return c?

1024


What are extern variables in c?

963


Is main is a keyword in c?

1084


How can you restore a redirected standard stream?

1074


How do you sort filenames in a directory?

1135


What are multidimensional arrays?

1085