A fundamental data structure consisting of a collection of elements, each element has index value.
int a[5] = {1,2,3,4,5};
Homogeneous
Stores elements of the same data type.
Contiguous Memory
Adjacent memory blocks for fast access.
Fixed Size (static)
In some languages, size is determined at compile-time.
Address of arrays[I] = base_address + (i * size_of_data_type)
| index 0 | index 1 | index 2 | index 3 |
|---|---|---|---|
| [ 1 ] | [2] | [3] | [4] |
| 0x100 | 0x104 | 0x108 | 0x112 |