0
Why array indexing start from zero?
2 Antworten
+ 2
The index is used as an offset. The first element of the array is exactly contained in the memory location that array refers (0 elements away), so it should be denoted as array[0]. Most programming languages have been designed this way, so indexing from 0 is pretty much inherent to the language.
+ 1
computer at its basic level starts counting by 0. so it is kept in language too some new language make it by 1 too but some not as people normally expect it there