10.1 Write a template function that returns the average of all the elements of an array. The arguments to the function should be the array name and the size of the array (type int). In main (),...


10.1 Write a template function that returns the average of all the elements of an array. The
arguments to the function should be the array name and the size of the array (type int). In main (),
exercise the function with arrays of type int, long, and double.


10.2 Create a function called amax() that returns the value of the largest element in an array. The
arguments to the function should be the address of the array and its size. Make this function into a
template so it will work with an array of any numerical type. Write a main () program that applies
this function to arrays of various types.





Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here