Question: Write a function that reverses the elements of an array so that the last element becomes the first, the second from the last becomes the

Write a function that reverses the elements of an array so that the last element becomes the first, the second from the last becomes the second, and the forth. The function is to reverse the elements in place - that is, without using another array. Then write a test driver to test your function. Test is twice, once with an even number of elements in the array and once with an odd number of elements in the array. ( need in c++ and show output)

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!