C Standards: C89 to C23
C evolves through ISO standards, and code should declare which it targets with -std=: C89/C90 (the classic baseline — declarations first in blocks, no // comments), C99 (// comments, mixed declarations, stdint.h, stdbool.h, designated initializers, VLAs), C11 (multi-threading, _Static_assert, _Generic, anonymous structs), C17 (bugfix release), and C23 (bool/true/false as keywords, constexpr, typeof).
Compilers default to a GNU dialect (gnu17-ish) with extensions enabled; -std=c17 -pedantic enforces strict standard C. Knowing the eras explains why old code looks different (all declarations atop functions) and which features are safe to use per project.
C89: the classic baseline
Declarations before statements in each block, no // comments, no mixed declarations — the style of K&R-era and legacy code.
C99: the modernization
// comments, declarations anywhere, <stdint.h>/<stdbool.h>, snprintf, designated initializers, exact-width integers.
C11/C17: course corrections
Threads, _Static_assert, _Generic selection, anonymous structs/unions; C17 fixed defects without new features.
Pin your standard
gcc -std=c17 -pedantic compiles strict standard C; without flags you get GNU extensions that may not port.
#include <stdio.h>#include <stdbool.h> int main(void) { bool ready = true; // needs C99 or newer int n = 3; printf("%d %d\n", ready, n); return 0;}Recommended resourcesAffiliate links · may earn us a commission
Recommended for learners
Practice what you learned
Re-implement each visualized algorithm in C yourself — building beats watching.