sizeof tells you how many bytes a type uses on this compiler and machine.
sizeof asks the compiler a simple question: how many bytes does this type use on this machine? It is not a guess and not a constant baked into the C language for int — it is a fact about this compiler and CPU.
sizeof(int).Each step highlights the matching C line. Program output appears only when a line that prints actually runs.
Five questions. Pick one answer each, then Check answers. The correct choice turns green.
1. sizeof(int) measures:
Size in bytes, implementation-defined.
2. On many desktop compilers sizeof(int) is:
Often 4, not guaranteed by the language.
3. Which type is at least 1 byte?
char is the unit of sizeof.
4. %zu is commonly used to print:
size_t matches sizeof.
5. float vs double:
double is usually 8 bytes.