Content deleted Content added
Cup o' Java (talk | contribs) →Numerical properties: added “{{by whom}}” to claim about name of first element |
m Dating maintenance tags: {{By whom}} |
||
Line 44:
Hence, the efficiency benefit at run time of zero-based indexing is not inherent, but is an artifact of the decision to represent an array with the address of its first element rather than the address of the "imaginary" element preceding the array. However, the address of that "imaginary" element located immediately before the first actual element of the array could very well be the address of some other item in memory not related to the array.
This situation can lead to some confusion in terminology. In a zero-based indexing scheme, the first element is "element number zero"; likewise, the twelfth element is "element number eleven". Therefore, an analogy from the ordinal numbers to the quantity of objects numbered appears; the highest index of ''n'' objects will be {{nowrap|''n'' − 1}} and referred to the ''n''th element. For this reason, the first element is often referred to{{by whom|date=February 2016}} as the ''zeroth'' element to avoid confusion.
== Science ==
|