5.47 · exercise

Quiz: Arrays and Structures - Fundamentals

Work through how arrays and structures are laid out in memory, and how AArch64 code computes the address of a single element or field.

0 of 5 correct

Knowledge Check

A function declares a local array of ten int values. Where does that array live while the function is running?

Knowledge Check

For a one-dimensional array, what is the address of element i?

Knowledge Check

How does C map a two-dimensional array onto the flat bytes of memory?

Knowledge Check

How does assembly code reach an individual field inside a structure?

Knowledge Check

On 64-bit Linux, an array of long values starts at the address in arr. Which expression gives the address of arr[2]?