C basics
The C that embedded interviews assume. Sizes and layouts are shown for 32-bit ARM and 64-bit ARM side by side.
- 01Start
Types, sizes and byte order
How many bytes each type uses on 32-bit and 64-bit ARM, how a number is laid out in those bytes, and how to pick a type with an exact size.
- 02Start
Signed, unsigned, overflow, promotion
Wraparound, undefined signed overflow, and how small integer types are promoted to int.
- 03Start
Casts, operators and precedence
How C parses expressions such as a & b == c and *p++, what a cast changes, and which expressions are undefined.
- 04Planned
Keywords
What static, extern, const, volatile, register and inline guarantee, and what they do not.
- 05Planned
Storage classes and segments
Which objects land in .data, .bss, .rodata, the stack and the heap.
- 06Planned
Functions and stack frames
Pass by value, pointers into the caller, dangling returns and the ARM calling convention.
- 07Planned
struct, union, enum, typedef
Padding from member alignment, union overlays and byte order.
- 08Planned
Preprocessor
Text substitution, arguments evaluated twice, do { } while (0), # and ##.