C program to find sum of the array elements (pass an integer array to a function and return the sum)
Given an array of integers (one dimensional array) and we have to find sum of all elements using user define function in C.
Here, we will pass array to the function and function will return the sum of the elements.
Here is the function that we have used in the program,
int sum_of_elements(int *arr , int n)