Write a recursive function that has an argument that is an array of characters
and two arguments that are bounds on array indexes. The function
should reverse the order of those entries in the array whose indexes are
between the two bounds. For example, if the array is
a[1] == 'A' a[2] == 'B' a[3] == 'C' a[4] == 'D' a[5] == 'E'
and the bounds are 2 and 5, then after the function is run the array
elements should be
a[1] == 'A' a[2] == 'E' a[3] == 'D' a[4] == 'C' a[5] == 'B'
Embed the function in a program and test it. After you have fully debugged
this function, define another function that takes a single argument which is
an array that contains a string value and that reverses the spelling of the
string value in the array argument. This function will include a call to the
recursive definition you did for the first part of this project. Embed this
second function in a program and test it.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.