๐Ÿ’ปap computer science a review

Zero-based indexing

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

Zero-based indexing is a numbering system where the first element in an array or list is assigned index 0 instead of 1. This means that elements are accessed by their position relative to zero.

"Zero-based indexing" also found in: