Arrays Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an array?

A

An array is a built in data structure (not elementary tho), allowing storing of data of the same primitive data type under the same name. It is finite

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

is a primitive data type and elementary data type the same thing?

A

yes

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

What dimensions can arrays be?

A

Any dimensions but i have to know about them up to 3d

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

What is the difference between an array and a list?

A

Array cannot be appended while program is being executed, these are finite

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

myArray = [51,72,6,90,123,456]

What is the output if statement print(myArray[0]) is written?

A

51

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

myArray = [51,72,6,90,123,456]

What is the output if statement print(myArray[5]) is written?

A

456

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

myArray = [51,72,6,90,123,456]

What dimension is this array?

A

1 dimensional array

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

Arrays are what based?

A

0 based, the first element is the 0 element in terms of index

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

What essentially is a 2d array?

A

a table of rows and columns (area like)

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

What essentially is a 2d array?

A

a cube of rows, columns and a depth (volume like)

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

Is an array static or dynamic?

A

static data structure, it cannot change in size although data items can be added and removed

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