Question: Write a C++ program which asks the user to enter a string and then passes it to a void recursive function which displays the string

Write a C++ program which asks the user to enter a string and then passes it to a void recursive function which displays the string in reverse.

The prototype of the function would be:void reverse(string s, int i);

The call would be: reverse(strIn, strIn.length());

A typical run will be:

Enter a string:

Four score and seven years ago ..

.. oga sraey neves dna erocs ruoF

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!