Data Structures Flashcards

1
Q

Block size of an array

A

number of elements x element size

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

where an array and other local variables are stored

A

Stack frame

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

How array elements are accessed

A

Using load and store instructions

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

row-major ordering

A

store each element of row 0, then row 1, etc.

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

column-major ordering

A

Store each element of column 0, then column 1, etc.

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

Esize represents

A

element(cell) size in bytes

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

2D list [1,…,n][1,…,m]:
row-major order, list[i][j] is

A

((mi)+j)Esize

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

block size for an n-dimensional array

A

elements x elementSize

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

offsets of fields that happen to be structures

A

a 2nd set of offsets for this field’s offsets
(structure.subfield.value)

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