Question: Write a recursive function that takes a string as an input and returns the reverse of the string. Write a recursive function rec_string that produces
Write a recursive function that takes a string as an input and returns the reverse of the string.
Write a recursive function rec_string that produces the output shown below for the corresponding function calls. Write a main function to test the function.
Method call rec_string(abcde), will produce the following output:
*
e
de
cde
bcde
abcde
Method call rec_string(abc), will produce the following output:
*
c
bc
abc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
