SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Walter Savitch ,julia Lobur
Chapter:
Recursion
Exercise:
Programming Projects
Question:5 | ISBN:9780321531346 | Edition: 7

Question

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.

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

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'.