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 returns the double average value of a one-dimensional integer array, in addition to determining the number of values in the array that are greater than the average. Assume that the corresponding function prototype statement is

double average(int x[], int npts,int *gtr);

where npts contains the number of values in array x and gtr is a pointer to the variable that stores the number of values in x that are greater than the average.

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