There is no check that you are writing within the array; the operating system will halt things with a segFault if you write over memory that the operating system thinks you shouldn't be. Clearly, you're writing beyond the array, but the memory immediately following the array is considered to be yours by the operating system so there is no segFault.
To sum up; writing beyond an array is not checked and there is no guarantee that it will cause a segFault.