Arrays and Structs Flashcards

1
Q

Arrays are a

A

sequence/list of variables of the same type

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

uint [10] x:

A

unsigned interger array of size 10

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

x[0] = 1;

A

//index access

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

uint [] y:

A

dynamically sized array

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

uint[] [5] z:

A

a narray. of 5 dynamic arrays

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

bytes, string

A

special arrays buy string doesn’t have index access

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

.length

A

give sthe length of the array

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

currently array of arrays can’t be used

A

in external fuctions (one way out of this is to use mappings of mappings, see later)

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