An integer identifying a position in an array. With zero-based indexing and capacity , valid array indices are . An array index identifies the slot rather than its stored value.
The permitted array indices for a length- array are under zero-based indexing. A one-past-the-end index can describe an empty remaining segment but cannot be dereferenced. Proving bounds safety requires showing that every executed read and write uses a permitted index, including evaluations in a loop guard. A known target inside the array can sometimes supply a stronger loop invariant than an explicit bounds test.

Ancestors (4)

  1. Array (data structure)
  2. Data structure
  3. Computer science
  4. Home

Discussion (0) New discussion

There are no discussions about this article yet.

Articles by others on the same topic (0)

There are currently no matching articles.