Skip to main content

C

Overview

C is a small, fast systems language that shaped Unix and today’s operating systems, embedded firmware, and language runtimes. It offers manual memory management, a minimal type system, and direct hardware access—powerful but requiring discipline to avoid undefined behavior.

Key concepts

  • Compilation model — Preprocess, compile, assemble, link.
  • Pointers & arrays — Address arithmetic; decay rules.
  • Stack vs heapauto storage vs malloc/free.
  • Undefined behavior — Out-of-bounds access, invalid shifts, data races.
  • Standard librarystdio.h, stdlib.h, string.h, POSIX extensions.

Build pipeline

Sample: hello + compile

#include <stdio.h>

int main(void) {
puts("hello, world");
return 0;
}
cc -std=c17 -Wall -Wextra -O2 -o hello hello.c

References