+ 2
Why array indexing always starts from zero?
This Question is asked in my Viva . I am totally confused there .
5 Respostas
+ 4
Good question! Well, that can be confusing for you right now, but computer is designed to count from zero becouse an old programming languages were working on binary (0-1) system and new languages accepted it and it just stay.
+ 3
well may be lule is right, I am not sure but I think when we start counting zero (0) comes first then 1 and it is less then 1. so we start 0123-9. That's totally my point of view and please correct me if I am so.
+ 2
Thank you !
+ 2
It indipends for every language and you are right for some of them like all C languages but Pascal and the others works way I explained.
+ 1
Because computers depends on math on every thing and counting numbers start from zero so it starts from zero in counting the index