Question: 1 1 . 3 0 LAB; Reverse a string c + + 1 1 . 3 0 LAB: Reverse a string Write a recursive function

11.30 LAB; Reverse a string c++11.30 LAB: Reverse a string
Write a recursive function called ReverseString() that takes in a string as a parameter and returns the string in reversed order. The main
function is provided to read a string from the user and call the ReverseString 0 function.
Ex: If the input of the program is:
He11o
the ReverseString() function returns and the program outputs:
Reverse of "Hello" is "olleH".
Ex: If the input of the program is:
Hello, world!
the ReverseString() function returns and the program outputs:
Reverse of "Hello, world!" is "!dlrow, olleH".
Hint: Move the first character to the end of the returning string and pass the remaining sub-string to the next ReverseString() function call.
5320033253150.4x20qy?
LAB
ACTIVITY
11.30.1: LAB: Reverse a string
#include "'"??"",
 11.30 LAB; Reverse a string c++11.30 LAB: Reverse a string Write

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!