Contents    Page-10    Prev    Next    Page+10    Index   

Suppose we have:


type myrec = record i : integer;
                    x, y : real end

What is the size of myrec in bytes?

  • A: 12
  • B: 20
  • C: 24
  • D: 32
  • E: 48

    Answer: D

    i is 4 bytes, pad to 8 to 8-align reals, 2 reals at 8 each, total is 24. But, we assume for X86-64 that records are 16-aligned and size is a multiple of 16.