C++ operator[] magic
Expression a[b]
is equivalent to *(a + b)
so in your example we have:
1[a]
which can be written as *(1 + a)
which is the same as *(a + 1)
which is finally the same as a[1]
BaseAddr[ Offset ] = *( BaseAddr + Offset )
Offset[ BaseAddr ] = *( Offset + BaseAddr ) = *( BaseAddr + Offset )