3.1 Data Structure Flashcards

(3 cards)

1
Q

What is an array?

A

An array is a static collection of items of the same data type called elements. Typically used when the required number of data items is known in advance.

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

2 benefits of using arrays

A
  1. Efficient data storage
  2. Fast access to elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

2 limitations of using arrays

A
  1. Must be the same data type
  2. Size of array cannot usually be changed when the program is running
How well did you know this?
1
Not at all
2
3
4
5
Perfectly