Write a program that initializes values in a one-dimensional array and Calculate the sum of an array using function.
Write a program that initializes values in a one-dimensional array. It passes the array as argument to a function which computes the sum of the array. The function should return the calculated sum to the calling function. So let’s Write Code: Let’s build logic First: Algorithm for code: Step 1: Start Step 2: Declare an…