Sum Of Array Elements

Write a C program to find the sum of the elements in an array.Input Format:Input consists of n+1 integers.The first integer corresponds to ‘n’, the size of the array.The next ‘n’ integers correspond to the elements in the array. Assume that the maximum value of n is 15.Output Format:Refer sample input and output for formatting details.Sample Input 1:523681Sample Output 1:The sum of the elements in the array is 20

Program Code:#include #define MAX_SIZE 15int main(){int arr[MAX_SIZE];int i, n, sum=0;scanf("%d", &n); for(i=0; i{scanf("%d", &arr[i]);}for(i=0; i{sum = sum + arr[i];}printf("The sum of the elements in the array is %d", sum);return 0;}