Question
C++ Programming NO COPYING OTHERS WORK ONLY ORIGINAL WORK Write a function that accepts a pointer to a C-string as its argument. The function should
C++ Programming
NO COPYING OTHERS WORK ONLY ORIGINAL WORK
Write a function that accepts a pointer to a C-string as its argument. The function should count the number of vowels appearing in the string and return that number. Write another function that accepts a pointer to a C-string as its argument. This function should count the number of consonants appearing in the string and return that number. Demonstrate these two functions in a program that performs the following steps:
Make sure The user is asked to enter a string.
Make sure The program displays the following menu:
A) Count the number of vowels in the string
B) Count the number of consonants in the string
C) Count both the vowels and consonants in the string
D) Enter another string
E) Exit the program
The program performs the operation selected by the user and repeats until the user selects E to exit the program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started