Frontend Labs
⋯

Appendices

A. C17 → C23: what's new, feature by feature

// nullptr — a real, type-safe null pointer constant (vs. NULL, which is
// typically (void*)0 or just 0 — ambiguous in variadic/overload-like contexts)
int *p = nullptr;

// bool/true/false are now KEYWORDS — no more #include <stdbool.h>
bool ok = true;

// constexpr — a compile-time constant with real type-checking (unlike #define)
constexpr int MAX_USERS = 100;
int users[MAX_USERS];

// typeof / typeof_unqual — write generic macros without _Generic boilerplate
#define SWAP(a, b) do { typeof(a) tmp = (a); (a) = (b); (b) = tmp; } while (0)

// [[attributes]] — standardized, compiler-checked hints
[[nodiscard]] int must_check(void);
[[deprecated("use new_func instead")]] void old_func(void);
[[maybe_unused]] static int debug_only_var;

// Binary literals and digit separators — readability wins, zero semantic change
unsigned int mask = 0b1010'1100;

// #embed — include a binary file's bytes as an initializer list, no external tool needed
// const unsigned char logo[] = { #embed "logo.png" };

// _BitInt(N) — exact-width integers of ANY bit width, not just 8/16/32/64
_BitInt(24) rgb_pixel;   // exactly 24 bits, no padding to 32

// Removed: implicit int ("x;" meaning "int x;") and K&R-style function
// definitions are gone — every function must have a real prototype now.

Generated from real-life-c-guide.md · 8 Oct 2026 16:36