1.5 Data Structures Flashcards

1
Q

What is a data structure?

A

An organized way of storing related data in a single entity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

State 2 types of data structures.

A
  1. Array
  2. Record
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an array? (2)

A
  1. Can store multiple items of the same data type under one name.
  2. Can have multiple dimensions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the code to create a 1D array?

A

Dim myArray [3] as integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the code to create a 2D array?

A

Dim myArray [3,2] as integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a record?

A

A way to store data of different data types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When is a record or an array used? (2)

A
  1. A record is used if multiple data types are needed to be processed.
  2. An array is used if a single data type is needed to be processed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly