Re:Why do arrays start at 0?
by vidarh on Wednesday August 24, 2022 @01:05PM
(#32582437)
In C, "a[x]" is effectively syntactic sugar for just "*(a+x)" (conversion rules for "+" means you don't need the sizeof). It also means you can reverse it and write e.g. "5[somearray]" if you really want to make developers want to throw rocks at you.
[ Parent
| on HN ]