Programming/Arrays

From Dev Wiki
< Programming
Revision as of 07:02, 7 May 2020 by Brodriguez (talk | contribs) (Create page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Arrays are one of the most common data structures.

For the most basic implementation (that most languages use), arrays are a sequential block of memory, where items are placed one after another from beginning to end. In other words, you can think of an array as a sequential, non-interrupting list of items.

Specifying an index declares which item number you wish to examine in the list. The first array index for most (but not all) languages will start at 0. This is contradictory to most people being introduced to arrays, who will (naturally) assume it starts at 1.