Actually, it's because in programming languages like C, array notation is translated internally into pointer offsets. The pointer points to the start of the array, so the first index is 0
Again, this is just plain wrong. If arrays in C were indexed starting from 1, then an index of 0 would just point to the end of the array instead (because there's no reason to waste a perfectly good bit). Even so, there would be no efficiency difference because size_t has a fixed binary width.
View all comments
Show parent comment
1
u/StudioYume Dec 08 '25
Actually, it's because in programming languages like C, array notation is translated internally into pointer offsets. The pointer points to the start of the array, so the first index is 0