Write a function to find the sum of array elements.
Int sum(int *);
int sum(int arr[]) { int s = 0, l = sizeof(arr)/sizeof(*arr); for (int i = 0; i < l; i++) { s += arr[i]; } return s; }
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment