Write a recursive function that has an argument that is an array of characters and second argument that is array indexes

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a recursive function that has an argument that is an array of characters and second argument that is array indexes

Post by answerhappygod »

Write a recursive function that has an argument that is an array
of characters and second argument that is array indexes .The
function should reverse the order of those entries in the array
whose indexes are between the two bounds.Then call this function in
a driver function where you declare an array of charecters and pass
it to the function For example, a[1]==’A’ a[2]==’B’ a[3]== ‘C’
a[4]==’D’ a[5]== ‘E’ a[6]==’F’ 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’ a[6]== ‘F’ Embed the
function in a program and test it.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply