Let's say we have the following array:
int arr[] = {0, 1, 2, 3, 4};
And then we type:
arr[5] = -23;
What exactly happens? Does this work at all, or does it make an error? If we were to draw out the stack memory for this program (assuming these are the only defined values), what would it look like?
TL;DR: Does arr[5] work? If so, does this make an entirely new array of size 6, or does it just internally have a pointer from arr[4] to arr[5]?