Jun 8, 2017 at 8:34am
Because x[y]
is equivalent to *(x + y)
.
a[2] = *(a + 2) = *(2 + a) = 2[a]
Last edited on Jun 8, 2017 at 8:36am
Jun 8, 2017 at 8:43am
That's great, @Peter87! (And thanks for re-editing.)
With your pointer arithmetic I can now see the logic - but I don't think I would dare use that form in my own code.
Thanks.
Last edited on Jun 8, 2017 at 8:43am