Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

Students also viewed these Programming questions