Problem

General Functions. Pointers are often used as function arguments when we want to return mo...

General Functions. Pointers are often used as function arguments when we want to return more than one value from the function. In each of the following problems, write the indicated function, and then develop a main function for testing the function:

Write a function that determines the maximum and minimum values from a one-dimensional integer array. Assume that the corresponding function prototype statement is

void ranges(int x[], int npts,int *max_ptr,           int *min_ptr);

where npts contains the number of values in array x, and max_ptr and min_ptr are pointers to the variables in which to store the maximum and minimum values in the array.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 6