answersLogoWhite

0

#include<stdio.h>

#include<stdlib.h>

void main()

{

char string[]="anystring";

int i=0,j,count=0;

j=strlen(string);

while(i!=j)

{

if(string[i]=='a'string[i]=='e'string[i]=='o'string[i]=='u'string[i]='i')

count++;

i++;

}

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Find vowel from given string in C plus plus language?

std::string test ("The cat sat on the mat"); std::string vowels ("aeiouAEIOU"); size_t pos = test.find_first_of (vowels); if (pos != test.npos) std::cout &lt;&lt; "Vowel found at position " &lt;&lt; pos &lt;&lt; std::endl;


Write a program that stores vowels in an array When you program is given a character it should indicate whether the character is vowel or not?

That's easy to do!This script will get the POST data from an HTML form and check if it is a vowel.


Does string have a long or short vowel?

The I has a short I sound, as in strip or sting.


Find out the square root for that given number using string?

Halv that given number,Make a square that has that half number as the length of a side.Stretch the string across the diagonal of the square from corner to corner.The length of the string is the square root of the given number


Does shrink have a short or long vowel sound?

The I in shrink has a short I vowel sound, as in string and stink.


A c plus plus program that defines vowels?

#include&lt;locale&gt; #include&lt;iostream&gt; #include&lt;string&gt; bool is_vowel(const char c) { static const std::string vowels = "AEIOU"; return( vowels.find(toupper(c))&lt;vowels.size() ); } int main() { std::string alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; for(size_t i=0; i&lt;alphabet.size(); ++i) { std::cout&lt;&lt;'\''&lt;&lt;alphabet[i]&lt;&lt;"\' is "; if( !is_vowel( alphabet[i] )) std::cout&lt;&lt;"not "; std::cout&lt;&lt;"a vowel."&lt;&lt;std::endl; } } Output: 'a' is a vowel. 'b' is not a vowel. 'c' is not a vowel. 'd' is not a vowel. 'e' is a vowel. 'f' is not a vowel. 'g' is not a vowel. 'h' is not a vowel. 'i' is a vowel. 'j' is not a vowel. 'k' is not a vowel. 'l' is not a vowel. 'm' is not a vowel. 'n' is not a vowel. 'o' is a vowel. 'p' is not a vowel. 'q' is not a vowel. 'r' is not a vowel. 's' is not a vowel. 't' is not a vowel. 'u' is a vowel. 'v' is not a vowel. 'w' is not a vowel. 'x' is not a vowel. 'y' is not a vowel. 'z' is not a vowel. 'A' is a vowel. 'B' is not a vowel. 'C' is not a vowel. 'D' is not a vowel. 'E' is a vowel. 'F' is not a vowel. 'G' is not a vowel. 'H' is not a vowel. 'I' is a vowel. 'J' is not a vowel. 'K' is not a vowel. 'L' is not a vowel. 'M' is not a vowel. 'N' is not a vowel. 'O' is a vowel. 'P' is not a vowel. 'Q' is not a vowel. 'R' is not a vowel. 'S' is not a vowel. 'T' is not a vowel. 'U' is a vowel. 'V' is not a vowel. 'W' is not a vowel. 'X' is not a vowel. 'Y' is not a vowel. 'Z' is not a vowel.


Do I need to write a program to find a substring in a given string in c plus plus?

No.


How do you write c programme to find proper subset of a given string?

you can use strstr()


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.


How do you write a program to find the no of words in a given string in dot net?

You find a language that can be targeted towards the .NET Framework. What you are suggesting is something related to string manipulation and you can work with delimiters.


How do you find the no of characters and numerics in the given string?

First of all numbers are not meant to be stored in a string and if u do so in C, these numbers will be treated as characters and you can not perform any calculation on these numbers, and to find the number of characters in a string use the strlen() from the string.h file.


Wap in c plus plus to find out the string is palindrome or not in?

use the strrev() function on the given string and compare with original string.If both are equal they are palindromes else not.