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

Array is an lvalue or not?

1130


Explain #pragma statements.

1052


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2131


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

1014


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

1089


What are compound statements?

1179


What is string length in c?

1104


What is the Purpose of 'extern' keyword in a function declaration?

1084


Explain is it valid to address one element beyond the end of an array?

1218


In a switch statement, what will happen if a break statement is omitted?

1067


Explain how are portions of a program disabled in demo versions?

1123


What are the different types of constants?

1077


When do we get logical errors?

1128


Do array subscripts always start with zero?

1304


What is the purpose of scanf() and printf() functions?

1245