Write a function named ReverseArray that takes an
int array and makes a copy of it which is
reversed—simply "flipping" it top to bottom. The subroutine should
take an array as input, so it needs an array parameter as well as the size
of the array. The subroutine also needs an output parameter for the
reversed list. (The reversed list should be a copy so that the original
list will not be lost.)
Write a driver for your subroutine to show that it works. Your driver may should let the user type in positive numbers, with a negative number to quit. Make sure you do not let the user enter more numbers than you have slots in your array.
Enter positive numbers (-1 to quit): ? 3 ? 45 ? 18 ? 22 ? 123 ? -1 Here's your numbers backwards: 123 22 18 45 3