All challenges
Multiple ChoiceBeginner 45s

sizeof with padding

For `struct A { char c; int i; };`, on a typical 64-bit platform with 4-byte int, what is `sizeof(A)`?
Options
  1. 15 (1 byte char + 4 byte int).
  2. 26 (aligned to 2 bytes).
  3. 316 (aligned to the largest member twice).
  4. 48 (3 bytes padding after c to align i).

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle