Create a gist now

Instantly share code, notes, and snippets.

1. Asks the user to enter any sequence of characters
2. The program should display all the lower-case vowels that are present and the number of times each vowel occurs
3. The program should display all the upper-case vowels that are present and the number of times each vowel occurs
4. The program should display the upper-case vowel which appears most frequently in the user input AND the number of times it appeared.
5. The program should display the lower-case vowel which appears most frequently in the user input AND the number of times it appeared.
6. The user must be asked if he/she wants to continue entering values or quit.
7. You must demonstrate effective use of the new and delete operators. THIS IS THE POINT OF THE QUIZ
8. Remember to comment your code
9. Use meaningful or mnemonic variable names
10. You must use a pointer to a variable of type char to store the user input, and you MUST allocate theEXACT amount of memory to store all the characters entered by the user. For example:
1. If the user types Awq, then you need to use the new operator to allocate dynamic memory for a pointer to a char of size 3: UserInputCharArray = new char[3];
2. If the user types 300 letters, then you need to use the new operator to allocate memory for a pointer to a char of size 300: UserInputCharArray = new char[300];
3. In order to accomplish this, you must capture the user input one char at a time using a loop.  As you are capturing the chars you need to be clever enough to count the chars as you are removing them from the input stream AND somehow use new and delete operators to create and destroy pointers (plural) to store the chars as you are removing them from the input stream. Remember that the new and delete operators work at RUN TIME NOT COMPILE time! So use them to allocate JUST THE EXACT AMOUNT OF MEMORY FOR THE ENTRY. 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment