What Every C Programmer Should Know About Undefined Behavior
by Chris Lattner · The LLVM Project Blog
Undefined behaviour is the single concept that separates competent C programmers from dangerous ones. Chris Lattner's three-part LLVM series explaining why signed overflow, null dereference and type-punning are undefined, how optimizers legitimately exploit that licence, and why the resulting miscompilations blindside otherwise experienced C programmers.
More resources on C Programming
Introducción a la programación con C
The best-known free Spanish-original university C text. It is rigorous and exercise-heavy, with a long treatment of pointers and malloc/free-based dynamic structures. University first-year textbook covering C from the ground up: types and operators, static arrays and structs, functions and parameter passing, pointers and dynamic memory with linked structures, and file I/O. Many worked examples and exercises; free PDF under CC BY-NC-SA.
C von A bis Z. Das umfassende Handbuch
The standard German-language C handbook, updated to C23 in the 5th edition: language core, pointers, dynamic memory, data structures and algorithms, secure programming, network, cross-platform and parallel programming. An older edition is free to read online as a Rheinwerk openbook.
Systemnahe Programmierung in C (SPiC) – Skriptum
Complete lecture script (866 slide pages) of FAU Erlangen's systems-programming course: C contrasted with Java, pointers and arrays, modules, AVR ATmega microcontroller architecture, interrupts and concurrency, then UNIX files, processes, signals, threads, dynamic allocation and stack layout. Directly teaches the topic note's 'how code maps to the machine' on bare hardware (ATmega328PB SPiCboard) before moving to the OS layer.
Le langage C
A free, CC BY-SA tutorial written by the community that runs about 18 hours. It goes from first programs to pointers, dynamic allocation, files and the preprocessor, then on to encodings, unions, variadic functions and _Generic, compiling with -std=c11 -Wall -Wextra -pedantic. Modern C11 practice from the first page: int main(void), return 0, strict warning flags. It covers the whole language, including portability topics (type representation, limits, locales, wide characters) that beginner courses usually skip.
苦しんで覚えるC言語
This is the free-first slot: the most-used native free tutorial for Japanese beginners. Free, long-running Japanese C tutorial known as 'Ku-C'. It moves slowly from a minimal program through variables, control flow, functions, arrays, strings, pointers, structs, file I/O, macros, dynamic memory and multi-file builds, with short algorithm chapters and a quick reference.
ハロー“Hello, World” OSと標準ライブラリのシゴトとしくみ 第2版
Traces a seven-line C Hello World program down through the compiled assembly, glibc's printf implementation, system calls and the Linux/FreeBSD kernel, teaching readers to investigate with debuggers and disassembly themselves. The 2024 second edition adds ARM alongside x86.