Skip to content
array data structure

File:1D_array_diagram.svg · Wikimedia Commons · See Wikimedia Commons

EntityQ186152· pop 56· linked from 599 articles

array data structure

Sign in to save

Also known as array, array index, arrays, sequence

data structure holding elements in a contiguous memory block

AI overview

An array is a way to store multiple items of data in your computer's memory in one organized, continuous block, making it easy to quickly access any item you need by its position. Arrays are useful because they're simple to understand and let programs retrieve information very fast, which is why they're one of the most fundamental tools in computer programming.

AI-generated from the Wikipedia summary — may contain errors.

Wikidata facts

Image
Array1.svg
Show 4 more facts
Commons category
Array data structure
name in kana
はいれつ
P13411
alcohols
Sources (5)

via Wikidata · CC0

~19 min read

Article

In computer science, an array is a data structure consisting of a collection of elements (values or variables), of the same memory size, each identified by at least one array index or key, the collection of which may be a tuple, known as an index tuple. In general, an array is a mutable and linear collection of elements with the same data type. An array is stored such that the position (memory address) of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called a one-dimensional array.

For example, an array of ten 32-bit (4-byte) integer variables, with indices 0 through 9, may be stored as ten words at memory addresses 2000, 2004, 2008, ..., 2036, (in hexadecimal: 0x7D0, 0x7D4, 0x7D8, ..., 0x7F4) so that the element with index i has the address 2000 + (i × 4). The memory address of the first element of an array is called first address, foundation address, or base address.

Gallery (5)

Connections

Categories