Question: hand write code please and answer a and b please 2. (20 points) Write a function Reverse() that creates and returns an array that contains

hand write code please and answer a and b please  hand write code please and answer a and b please 2.
(20 points) Write a function Reverse() that creates and returns an array

2. (20 points) Write a function Reverse() that creates and returns an array that contains reversed elements of an array. Following is the prototype of the function: int* Reverse(int* arr, int size); The function receives two parameters: (1) an array of int, and (2) size of the array. The function returns a new dynamically allocated array whose elements are the reverse of arr. The size of the returned array must be the same to the size of arr. With your Reverse(), the following program int main() { int a[] = { 10, 30, 20, 15, 40, 50, 45 }; int size = sizeof(a) / sizeof(a[@]); // //int size = 7; int* revs - Reverse(a, size); cout

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!