Arrays and Structs Flashcards
1
Q
Arrays are a
A
sequence/list of variables of the same type
2
Q
uint [10] x:
A
unsigned interger array of size 10
3
Q
x[0] = 1;
A
//index access
4
Q
uint [] y:
A
dynamically sized array
5
Q
uint[] [5] z:
A
a narray. of 5 dynamic arrays
6
Q
bytes, string
A
special arrays buy string doesn’t have index access
7
Q
.length
A
give sthe length of the array
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)