Learn C
#include "gettingstarted/standards.h"

C Standards: C89 to C23

#concept

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.

#how it works
1

C89: the classic baseline

Declarations before statements in each block, no // comments, no mixed declarations — the style of K&R-era and legacy code.

2

C99: the modernization

// comments, declarations anywhere, <stdint.h>/<stdbool.h>, snprintf, designated initializers, exact-width integers.

3

C11/C17: course corrections

Threads, _Static_assert, _Generic selection, anonymous structs/unions; C17 fixed defects without new features.

4

Pin your standard

gcc -std=c17 -pedantic compiles strict standard C; without flags you get GNU extensions that may not port.

#example
#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;
}
Output
1 3
1stdbool.h provides bool/true/false — these don't exist in strict C89.
2Mixed declarations (n after a statement-free zone is fine anywhere in C99+) compile cleanly.
3bool prints as 1 — it is an integer type underneath, printed with %d.
#use cases
Choosing -std=c17 for portable modern code vs gnu17 for Linux-only conveniences
Reading legacy C89 code (declarations-first blocks) without confusion
Knowing which features (declarations anywhere, stdbool) need C99+
Checking __STDC_VERSION__ to feature-detect the compiling standard

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books

Practice what you learned

Re-implement each visualized algorithm in C yourself — building beats watching.