answersLogoWhite

0

You need to scan through the string and keep track of the vowelsoccurring. Here is a sample program:

#include

#include


int countVowels(char[] s){

int count = 0, i;

for( i=0; char[i] != '\0'; i++){

switch(char[i]){

case 'a':

case 'e':

case 'i':

case 'u':

case 'o': count++;break;

}

}

return count;

}


int main(){

char str[256];

printf("Enter the string:\t");

scanf("%s", str);

printf("The number of vowels in the string are :%d\n", countVowels(str));

return 0;

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

What does the NPV function do in Excel?

You use the NPV function. Start by specifying the rate and follow it with a list of future values that you want to help determine your result. So you could have something like this:=NPV(5%,10,20)


To present or hold up to view?

display


What are to different meanings for project?

To display or to present


What is the present tense of the word displayed?

I/you/we/they display. He/she/it displays. The present participle is displaying.


Where is a divison sign on a keyboard?

The division sign ÷ can typically be found on a standard keyboard above the 7 key on the numerical keypad, or sometimes as an alternate function of the forward slash / key. You can usually access it by holding the Shift key while pressing the desired key.


Where is the times button on the Mac keyboard?

On a keyboard the times button has the symbol "*" printed on it, this is usually found as upper case "8" but there may also be a "*" present on the numeric keypad section of your keyboard, if your keyboard has this.


If you want to find the present value of an investment you should choose the financial function?

You can use the PV function or the NPV function. Present Value is the result of discounting future amounts to the present. Net Present Value is the present value of the cash inflows minus the present value of the cash outflows.


When oxygen is not present what does not function?

electron transport chain does not function


What is the function of thermometer in a autoclave?

The function of a thermometer in an autoclave is to measure and display the temperature inside the autoclave chamber. This is important to ensure that the sterilization process reaches the required temperature for a specified period of time in order to effectively kill any microorganisms present on the instruments being sterilized.


What is the Function of education in present context?

what are the functions of education in the present day context


What are the Difference between display and list commands?

display command help to display the single current record in a database where as list command helps to display all the current record which are present in a data base.


How many keys are present in modern keyboard?

Different languages have different hardware. Most often a 101 key keyboard is supported by most software.