Program in C++
2. Write a function ArraySum, that takes an array as an input, and returns the sum of all its elements. Utilize a function template so that it would work for an arbitrary type. Then, in the main () function, call ArraySum for an int array and a double array. You may initialize the array as follows: int MyArray [10]4, 0, 453, 1029, 44, 67, 111, 887, 4003, 1002; Show transcribed image
OR
OR