Assignment: #RecursiveReverse Due: 10/21/02018 Points: 4


Write a C++ program that prompts the user to enter a sequence of characters comprised of letters and digits only. At most 127 characters can be entered. Print error messages each time an invalid character is entered. Valid characters must be stored in an array of type char. Print the contents of the array without looping through the array.

Pass the array to a function named reverse that reverses the content of the array using recursion. The reverse function must be passed an array-of-char; however, when I wrote the program, my reverse function took three arguments: array-of-char and the two indexes to swap (i.e. reverse).

Print the contents of the array reversed without looping the array.

Example input/output:

   (prompt) enter at most 127 letters and digits (press ENTER when done):  <hello>
   hello reversed is olleh