C Examples Sum Array
# C Example - Sum of Array Elements
[ C Example](#)
Use a for loop to iterate through the output elements and sum them up:
## Example
#includeint main(){int array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; int sum, loop; sum = 0; for(loop = 9; loop>= 0; loop--){sum = sum + array; }printf("Sum of elements: %d", sum); return 0; }
The output is:
Sum of elements: 45
[ C Example](#)
YouTip