Display the vowel characters


Write, Compile and Execute a C++ program that enters a string from the user (a full stop ‘.’ indicates the end of the input string) and finds and displays the vowel characters ( ‘a’, ‘e’, ‘i’, ‘u’, ‘o’ ) contained in it (both upper- and lowercase characters are processed). The program includes the following function prototypes:
void read_str (char str[ ], int & n); // enters the characters from the user
int display_vowels (char str[ ], int n); // returns the number of vowels
Example: For the input string “This is the next lab experiment”, the program outputs:
iieeaeeie
Last edited on
What have you tried so far?
Do you know how to start the program?
Topic archived. No new replies allowed.