You said it yourself; each integer is 4 bytes long. They are stored contiguously in memory. list
is the address of the first of them (zeroth, to be precise). Assuming that you use zero based indexing when you say list[3]
, the address of list[3]
will be list + 3*4
, or list+12
. In general, the formula is base+index*4
, where base
is the address of the array, and index goes from 0 to 99. 4 comes from the integer size.
To use your example, if the array is at 0x10010010, then list[3] would be at 0x1001001C, list[16] would be at 0x10010050.
As for the assembly, you didn't tell us which CPU/emulator are you using. There's more than one flavor of assembly out there.
Some types of assembly, notably Intel x86 and ARM, have built-in logic for index scaling for accessing integer arrays - the CPU will multiply the index (stored in a register) by 4 for you.