Skip to main content

Practice · 1 of 6

Report Object Sizes

CHALLENGE
Difficulty: advanced+25 XP

Implement void program(void) that prints the sizes of the fundamental integer types on this platform, one per line: `` char: 1 short: 2 int: 4 long: 8 ` Use sizeof` for each type — your code must compute them, not hard-code numbers.

Back to lesson: Practice: Object Layout Forensics