Array index runs from 0 to size-1. So for int myArray the indexing is 0 to 15! not 1 to 16.
So the for loop should look like
There is no bounds checking in c/c++ so you will not be given any warning if you try to read/write outside the bounds to the array.
Writing out side the array will over write other data with random results