0
Why array index start from zero?
Any one knows the answer then please tell me
4 Antworten
+ 3
🤔🤔
🗨
https://www.sololearn.com/discuss/2067915/?ref=app hope it helps.
+ 2
Because we programmers count from zero
0
Computers generally count from 0. Back in the old days code was very low level, sometimes you didn't even have arrays, you had to manually calculate offsets in memory, and an offset of 0 would be the first element.
It's a standard from the past which we didn't wanna break, so we kept it. Some languages decided that this tradition is not important, and they count from 1. It's all language specific.