Standards for C Programmings
C standards are the published versions of the language, such as C89, C99, C11 and C17, which define syntax, the standard library and what counts as undefined behaviour. Modern C adds features like fixed-width integer types, designated initialisers and inline functions, and compiler flags select the version.
Stage: Building Programs · Part of the C Programming roadmap · Last reviewed 19 November 2026
What to learn in Standards
- Select a language standard with the -std compiler flag
- Use stdint.h types such as uint32_t when exact sizes matter
- Use bool from stdbool.h and designated initialisers for structs
- Define undefined, unspecified and implementation-defined behaviour with examples
- Enable compiler warnings and sanitizers to catch standards violations
Standards interview questions
What is undefined behaviour in C?
It is code for which the standard imposes no requirements, such as signed integer overflow, out-of-bounds access or dereferencing NULL. The program may crash, appear to work or behave differently under optimisation, so it must be avoided.
Why use fixed-width types like int32_t?
The size of int and long varies across platforms. Types from stdint.h guarantee exact widths, which matters for file formats, network protocols, hardware registers and portable code. Use them when the number of bits is part of the requirement.
Where Standards fits in the C Programming roadmap
Standards belongs to the Building Programs stage (intermediate level). Tooling.
Other units in this stage
Back to the full C Programming roadmap