Question: Write a function that accepts a pointer to a C - string as its argument. The function should count the number of vowels appearing in
Write a function that accepts a pointer to a Cstring 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 Cstring 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:
The user is asked to enter a string.
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 Enter another string
D Exit the program
The program performs the operation selected by the user and repeats until the user selects D to exit the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
