Question: 3.1 code a function named reverse that takes as its arguments the following: (1) an array of floating point values; (2) an integer that tells

3.1 code a function named "reverse" that takes as its arguments the following:

(1) an array of floating point values;

(2) an integer that tells how many floating point values are in the array.

The function must reverse the order of the values in the array.Thus, for example, if the array that's passed to the function looks like this:

012345 6 7 8 9

25 78 96 47 12 35 96 25 78 35

Then the function should alter the array so that it looks like this:

0 1 2 3 4 5 6 7 8 9

25 78 96 47 12 35 0 0 0 0

and it should change the value of the argument so that it is 6 instead of 10. The '0' markes in the cell after the 6th cell indicate that it does not matter whats number are in those cells when the function returns.

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 Programming Questions!