1.5 Data Structures Flashcards
1
Q
What is a data structure?
A
An organized way of storing related data in a single entity.
2
Q
State 2 types of data structures.
A
- Array
- Record
3
Q
What is an array? (2)
A
- Can store multiple items of the same data type under one name.
- Can have multiple dimensions.
4
Q
What is the code to create a 1D array?
A
Dim myArray [3] as integer
5
Q
What is the code to create a 2D array?
A
Dim myArray [3,2] as integer
6
Q
What is a record?
A
A way to store data of different data types.
7
Q
When is a record or an array used? (2)
A
- A record is used if multiple data types are needed to be processed.
- An array is used if a single data type is needed to be processed.