3 ms·
> In C you can write i[t] instead of t[i], but don't do it. I had to check this myself. I'm astonished.
by SwiftyBug 6y ago
> In C you can write i[t] instead of t[i], but don't do it.
I had to check this myself. I'm astonished.
- ChrisSD 6y agoC array access syntax is just syntactic sugar for pointer arithmetic. The array decays to a pointer so `t[i]` is interpreted as: *(t + i) So you can see how swapping that around to `i[t]` is effectively the same operation: *(i + t)