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 different types of linkage exist in c?

971


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

6187


What is the difference between malloc() and calloc() function in c language?

1028


Write a program which returns the first non repetitive character in the string?

1053


How can this be legal c?

1043


Why does everyone say not to use scanf? What should I use instead?

1365


Why c is a mother language?

961


What is the purpose of void in c?

991


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1216


How can you determine the maximum value that a numeric variable can hold?

1148


What is hungarian notation? Is it worthwhile?

1167


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2714


Disadvantages of C language.

1043


What is sorting in c plus plus?

922


Can we add pointers together?

999