Loop problems

You're writing beyond the end of your array. There are only 6 elements and you're trying to write to 7.

for (int i = 0; i <= 6; i++) {