I am attempting to do this for a smaller example so that I can do it for a larger sample.
Here is my attempted code:
int counts[0];
int numbers[] = {1,2,3,4,5,6,7,8,9,10};
for(int i = 0; i < 10; i++)
counts[0] += numbers[i];
printf("%d ", counts[0]);
This should yield 55, but my output is only 14. There is an issue with how I am setting up the numbers
array, but I am not quite sure how to fix this. Any help is appreciated, thank you.