Arrays: Flashcards
1
Q
What is an array?
A
A data structure for sorting ordered sets of data of the same data type in a single identifier
2
Q
What are some characteristics of an array ?
A
- Static data structure
- Mutable
- Can only store one data type
3
Q
What does static mean?
A
It means cannot change size once created
4
Q
What does mutable mean?
A
It means items can be changed once created
5
Q
What are the types of array?
a)
b)
c)
A
a) 1 dimensional array (1D array)
b) 2 dimensional array (2D array)
c) 3 dimensional array (3D array)
6
Q
1 dimensional array (1D array)
A
- A linear array
- An ordered static set of elements
7
Q
2 dimensional array (2D array)
A
- Can be visualised as a table
- Go down rows and along columns to find position in an array
8
Q
3 dimensional array (3D array)
A
- Can be visualised as a multi-paged spread sheet or multiple 2D arrays