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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started