## Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

# Why are the answers 2, 6, 14 instead of 2, 6, 11?

```#include <stdio.h>
int main() {
int many[] = {2, 4, 8};
int sum = 0;
for (int i = 0; i < 3; i++;) {
sum += many[i];
printf("sum %d\n", sum);
}
return 0;
}
``` What you're doing here is creating an array of numbers (2, 4, 8), creating a variable to hold the sum as it is determined, then looping over each number in the array and adding it to the `sum` at that time. Each time the loop is run, the `sum` will be equal to all the numbers in the array before the one it's currently on, added together. Essentially, in its current state, it's equivalent to doing this:
```int sum = 2 + 4 + 8;
Of course, the sum of 2 & 4 is 6, and the sum of 6 & 8 is 14. Thus, the final value of the `sum` is 14