Question: 3.2 Task 2 (2 marks) Write a C function that accepts an unsorted array of integers and the length of the array as arguments. The

 3.2 Task 2 (2 marks) Write a C function that accepts

3.2 Task 2 (2 marks) Write a C function that accepts an unsorted array of integers and the length of the array as arguments. The function should then compute the average value of all the numbers, and return the number closest to the average by returning a pointer to that closest element. The function prototype is given as follows: int *find_closest_to_average (int the_array [], int num_elements)

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