Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
In computer science, an index refers to the position or location at which an individual element is stored within a data structure, such as an array. Indices typically start from 0 and increment by 1 for each subsequent element.
Related terms
Array Index Out of Bounds: The situation that occurs when attempting to access an index that is outside the valid range of indices for an array.
Zero-based Indexing: A system where the first element in an array is assigned the index 0, as opposed to starting with 1.
Negative Indexing: A feature in some programming languages that allows accessing elements in reverse order by using negative indices.