C
These notes cover C through the scope of Kernighan and Ritchie's The C Programming Language, second edition: the tutorial core, the expression and type system, control flow, functions, pointers, structures, input/output, the UNIX interface, the ANSI standard library, and the gap between K&R-era style and modern C practice.
C is a small language with unusually direct access to representation. Arrays are contiguous storage, strings are null-terminated character arrays, pointers are typed addresses, and much of the standard library is built out of explicit buffers, status returns, and caller-managed storage. That directness is why K&R can move quickly from "hello, world" to sorting lines, parsing declarations, building hash tables, walking directories, and sketching an allocator.
The pages emphasize K&R idioms: pointer-based traversal, compact stream filters, explicit prototypes, small functions, file-scope static state, careful use of macros, and precise notes on undefined or implementation-defined behavior. The examples are written in modern prototype style while preserving the book's model of how C programs are shaped.
- Tutorial Introduction
- Types, Operators, and Expressions
- Control Flow
- Functions and Program Structure
- Preprocessor and Separate Compilation
- Pointers, Addresses, and Arrays
- Strings, Pointer Arrays, and Command-Line Arguments
- Function Pointers and Complex Declarations
- Structures, Typedef, Unions, and Bit Fields
- Linked Structures and Hash Tables
- Standard I/O and Formatted I/O
- File Access and Error Handling
- Unix System Interface
- Storage Allocation
- Standard Library Reference
- Modern C Considerations