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 / vadivel t

#include<stdio.h>
#include<conio.h>

int main()
{
char ptr[100]= "She lives in NEWYORK";
printf("VOWELS EXIST %d TIME(S)\n",CountVow(ptr));
getch();
}

int CountVow(char *ptr)
{
int count = 0;
while(*ptr != '\0')
{
if((*ptr == 'a') || (*ptr == 'A') || (*ptr == 'e') ||
(*ptr == 'E') || (*ptr == 'i') ||
(*ptr == 'I') || (*ptr == 'o') || (*ptr == 'O') ||
(*ptr == 'u') || (*ptr == 'U'))
{
count++;
}
ptr++;
}
return count;
}

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to delete a node from linked list w/o using collectons?

2828


can anyone please tell about the nested interrupts?

2190


How can I call fortran?

1103


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1223


What are the types of data types and explain?

1139


How do you list files in a directory?

1217


Explain indirection?

1184


What is indirection?

1152


Write programs for String Reversal & Palindrome check

1140


What is variable in c example?

1133


Why do we need arrays in c?

1217


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1131


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1291


Can we declare variables anywhere in c?

1057


Where register variables are stored in c?

1005