+ 2
Why array index size starts with zero
6 odpowiedzi
+ 8
why not
+ 6
Because it's really an offset telling the computer how many items away from the first item a thing is.
+ 4
Good info here:
http://stackoverflow.com/questions/7320686/why-does-the-indexing-start-with-zero-in-c
It looks like there's a good memory/mathematical reason to starting at 0, and a definition reason.
The definition reason would be because the index is how far away the element is from the head pointer of the array (the first element). So the first element is 0 index's away. Why they use that definition, I'm not sure. I suggest you check out the link above.
+ 3
Cpu have address start from 0000, that's why array should start from index 0, if not it would waste a memory space.
0
I to dont know today interviewer asked me???
0
Becz the numbers from 0 so machine is designed like that