News for hackers. Stuff that matters.
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.
Re:Why do arrays start at 0? by yonrg on Wednesday August 24, 2022 @05:29PM (#32586027)
hehe, that was me :) when I was young.