| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Why do programmers start counting from 0?
Wasn't really for speed or space. With memory management, when you
create an array, the indexer just does pointer arithmetic. so for an
array of 10 ints, you set aside 40 bytes of memory. [0] will give you
the starting memory address of the array + 0 * sizeof(int). [1] will
give you 1 * sizeof(int) or 4 and so on.
Received on Thu Dec 09 2004 - 17:08:51 CST
![]() |
![]() |