Write a user-defined function to find the sum of an array passed as argument. a) Find the sum of all elements. b) Find the sum of first 5 elements. c) Find the sum of last 5 elements.
-Write a program that declares an array of 10 elements and uses this
function to