that's impossible, did you try to run it again and had the same results?
maybe the compiler assigns random value to each elements of the array and luck put the value of t in the 1st element of the array
When a function is called, memory is allocated for the function's local variables. This portion of memory is called the "stack".
To my knowledge, the compiler doesn't need to maintain a certain order of local variables on the stack. So your code may not work for other people, and may not work for you either if you enable optimizations.