Difference between revisions of "Zero-based numbering"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
Line 15: Line 15:
 
== See also ==
 
== See also ==
  
* [[Array data structure]
+
* [[Array data structure]]
 
* [[Computer programming]]
 
* [[Computer programming]]
 
* [[Computer science]]
 
* [[Computer science]]
 
* [[Mathematics]]
 
* [[Mathematics]]
 +
 
== External links ==
 
== External links ==
  
 
* [https://en.wikipedia.org/wiki/Zero-based_numbering Zero-based numbering] @ Wikipedia
 
* [https://en.wikipedia.org/wiki/Zero-based_numbering Zero-based numbering] @ Wikipedia

Revision as of 07:39, 1 September 2015

In computer programming, zero-based numbering is a way of numbering in which the initial element of a sequence is assigned the index 0, rather than the index 1 as is typical in everyday non-programming circumstances. See Array data structure.

Description

Under zero-based numbering, the initial element is sometimes termed the zeroth element, rather than the first element; zeroth is a coined ordinal number corresponding to the number zero.

In some cases, an object or value that does not (originally) belong to a given sequence, but which could be naturally placed before its initial element, may be termed the zeroth element.

There is not wide agreement regarding the correctness of using zero as an ordinal (nor regarding use of the term zeroth) as it creates ambiguity for all subsequent elements of the sequence when lacking context.

Numbering sequences starting at 0 is quite common in mathematics, in particular in combinatorics.

In computer science, array indices also often start at 0, so computer programmers might use zeroth in situations where others might use first, and so forth.

See also

External links