1. First compute size of each element, by considering size of each field and offset to each field. field name type offset alignment is even multiple of primitive's size s short 0 alignment is 0 * 2 c char 2 alignment is 2 * 1 t short 4 alignment is 2 * 2 d char 6 alignment is 6 * 1 r real 16 alignment is 2 * 8 i int 24 alignment is 6 * 4 Note wasted space at offsets: 3, 7- 15. (Comment: when I solved this in class, I aligned the double at offset 8. That is not correct, because reals must be aligned at an offset that is an even multiple of 8: 0, 8, 16, 32, 48, 64, 80, ... ) So, the total size of a record is 28 bytes. Second, compute the size required for an array of 10 elements A: array[0..9] of record. Notice the element A[0] has offset 0 and the element A[1] has offset 0 + 28 = 28. Because the first primitive element of A[i] is a short, it can be aligned at 28 (28 = 14 * 2, 14 is an even multiple of 2). Indeed, every element of A[i] can be aligned directly following the previous element A[i-1] --> there is no wasted space between elements of A[]! Thus, the size of A is the size of each element of A times the number of elements in A. I.e., 28 * 10 = 280. 2. To get to A[5], you have to skip over elements A[0], A[1], A[2], A[3], A[4]. That is, for array A having bounds [lb .. ub] = [0 .. 9], skip over 5 - lb records. Then multiply by the size of each record (which I can do, because there is no wasted space between elements of A). So, offset to A[5] = (5 - 0) * 28 = 140 3. Offset to A[5].i is the offset to A[5] (calculated in #2) plus the offset (within an element of A) to the field i (calculated in #1). So, offset to A[5].i is 140 + 24 = 164. 4. For a 2D array where lower and upper bounds are given for each dimension, a[lbr .. ubr] [lbc .. ubc] the size of the array is the total number of elements times the size of each element. So, size = (ubr - lbr + 1) * (ubc - lbc + 1) * 4 = (5 - - 5 + 1) * (10 - 0 + 1) * 4 = 11 * 11 * 4 = 484. 5. Offset to a[0][9] requires skipping over (0 - lbr) rows, then skipping over (9 - lbc) columns. Each row requires (ubc - lbc + 1) * 4 bytes = (10 - 0 + 1) * 4 = 44 bytes. So, (0 - lbr) * 44 + ( 9 - lbc) * 4 = (0 - -5) * 44 + (9 - 0) * 4 = 5 * 44 + 9 * 4 = 256