Staying within the array bounds
You must be careful to stay within the bounds of the array.
If you attempt to access an element at an index value that is equal to or larger than the size of the array:
The program will abort with an error at runtime.
Thus, if you create and populate an array containing five elements and you attempt to access the element at index 5, the program will abort.
Similarly, if you attempt to access an array element using a negative index:
The program will abort with an error.
Attempting to access an array element that is outside the bounds of the array is a logic error.