Why index always start with zero ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11

Why index always start with zero ?

what useful

8th Jul 2017, 11:40 PM
Mahmud amen
Mahmud amen - avatar
2 Answers
+ 10
Because arrays are blocks of memory location, and the start of an array is an offset from the beginning of the memory location. So 0 represents an offset of 0 from the start.
8th Jul 2017, 11:43 PM
Karl T.
Karl T. - avatar
+ 1
In solving a physics problem by hand, we set time=0 at the starting point
3rd Aug 2017, 12:36 AM
Sabine Scott
Sabine Scott - avatar