-2[arr]
is parsed as -(2[arr])
. In C (and in C++, ignoring overloading), the definition of X[Y]
is *(X+Y)
(see more discussion of this in this question), which means that 2[arr]
is equal to arr[2]
.
-2[arr]
is parsed as -(2[arr])
. In C (and in C++, ignoring overloading), the definition of X[Y]
is *(X+Y)
(see more discussion of this in this question), which means that 2[arr]
is equal to arr[2]
.