Skip to main content

Learning Resources

This module is populated from the local chunked books in library/raw/semester-04-systems-programming/books. Use this page as a source map, not as an instruction to read everything.

Source Stack

BookRoleHow to use it in this module
The C Programming Language (Kernighan & Ritchie, 2nd ed)Primary teaching sourceDefault escalation for every C language topic in Clusters 1-5
Computer Organization and Design (Patterson & Hennessy)Selective supportUse for the translation pipeline, instruction representation, and what the assembler/linker actually produce
Code (Petzold)Background onlyUse when you want to rebuild intuition for what the machine is doing underneath C
SICPOptionalUse only if a concept about abstraction clicks better with a Scheme-flavored rephrasing; otherwise skip

Resource Map by Cluster

Cluster 1: The C Mental Model

NeedBest local chunkWhy
first reading of C as a languageK&R: Getting startedCanonical "hello, world" in context
abstract machine and pointersK&R: Pointers and addressesBest short intro to the address-of-object model
the translation pipeline, big pictureCOD: Translating and starting a programClear walkthrough with diagrams
translation pipeline detailCOD: Translating and starting a program (Part 2)Compiler -> assembler transition
object files and linkerCOD: Translating and starting a program (Part 3)What a .o contains and how the linker resolves symbols
dynamic linking and loadCOD: Translating and starting a program (Part 5)Useful once you hit "shared library not found"
C standards summaryK&R: Appendix C - Summary of changesCross-reference between K&R and C89
binary representation backdropCODE: Bit by bit by bitIntuition for what the C abstract machine's bytes are

Cluster 2: Types, Expressions, and Control Flow

NeedBest local chunkWhy
variables and namesK&R: Variable namesIdentifier rules and conventions
constants and literalsK&R: ConstantsInteger, float, character, string literals
conversions and promotionsK&R: Type conversionsInteger promotion and usual arithmetic conversions
formal conversion rulesK&R: Conversions (A.6)Reference-manual view of all conversion rules
increment/decrement and sequence pointsK&R: Increment and decrementDirect examples of UB traps
bitwise operatorsK&R: Bitwise operatorsBaseline coverage with examples
precedence table + rulesK&R: Precedence and order of evaluationCanonical precedence reference
assignment expression semanticsK&R: Assignment expressions (A.7.17)Needed for subtle = inside conditions
statements and blocksK&R: Statements and blocksControl-flow basics
loops and forK&R: Loops - while and forIdiomatic loop patterns
break and continueK&R: Break and continueWhen to exit or skip

Cluster 3: Functions, Scope, and Storage Classes

NeedBest local chunkWhy
first functionsK&R: Functions (1.7)Minimal function example in context
function basics in detailK&R: Basics of functions (4.1)Prototypes vs definitions clearly stated
non-integer returnsK&R: Functions returning non-integersWhy explicit prototypes matter
external variables and scopeK&R: External variables and scopeFirst exposure to file-scope vs block-scope
external variables formallyK&R: External variables (4.3)extern declarations and the single definition
scope rules in detailK&R: Scope rules (4.4)Block vs file vs function scope
initializationK&R: Initialization (4.9)Static vs automatic initialization rules
scope and linkage, reference manualK&R: Scope and linkage (A.11)Formal statement when intuition fails
meaning of identifiersK&R: Meaning of identifiers (A.4)Linkage and storage duration in one place
preprocessor overviewK&R: The C preprocessor (4.11)Primary #include/#define/#if coverage
preprocessor referenceK&R: Preprocessing (A.12)Formal specification
macro expansion detailK&R: Macro definition and expansion (A.12.3)Where the subtle rules live
external declarationsK&R: External declarations (A.10)Canonical rules for defining/declaring at file scope

Cluster 4: Arrays, Strings, and I/O

NeedBest local chunkWhy
arrays (first read)K&R: Arrays (1.6)Canonical array introduction
character arrays and stringsK&R: Character arrays (1.9)Null-terminator contract in context
pointers and function argumentsK&R: Pointers and function argumentsExplains pass-by-value-of-pointer
pointers and arrays (decay)K&R: Pointers and arrays (5.3)The foundational array-decay chunk
address arithmeticK&R: Address arithmetic (5.4)p + 1 in terms of element size
character pointers vs arraysK&R: Character pointers and functions (5.5)String literal vs char[] distinction
multi-dimensional arraysK&R: Multi-dimensional arrays (5.7)Row-major layout and passing to functions
command-line argumentsK&R: Command-line argumentsargc / argv idioms
standard I/O introK&R: Character input and output (1.5)getchar/putchar baseline
printf and scanfK&R: Standard input and output (7.1)Main reference for formatted I/O
scanf detailsK&R: Formatted input scanf (7.4)Format specifiers and pitfalls
file accessK&R: File access (7.5)fopen/fread/fwrite/fclose
error handlingK&R: Error handling - stderr and exit (7.6)Where to route errors

Cluster 5: Structuring C Programs

NeedBest local chunkWhy
struct basicsK&R: Basics of structures (6.1)Canonical struct introduction
structs and functionsK&R: Structures and functions (6.2)Pass-by-value vs pass-by-pointer tradeoffs
arrays of structuresK&R: Arrays of structures (6.3)Layout in memory
pointers to structuresK&R: Pointers to structures (6.4)-> idiom and why
self-referential structsK&R: Self-referential structures (6.5)Foundation for linked data structures
table lookupK&R: Table lookup (6.6)Good example of struct + array + hash
typedefK&R: typedef (6.7)When to alias and when not
unionsK&R: Unions (6.8)Shared storage and tagged unions
header / module organizationK&R: External declarations (A.10)Formal declaration vs definition rules
linker perspectiveCOD: Translating and starting a program (Part 4)What the linker does with your .os

Exercise Support Chunks

Use these when the concept pages are understood but your fluency is weak:

External Resources (Read-If-Curious)

Validated URLs. Use them only when a concept page and the local chunks have not been enough.

Use Rules

  • If you are stuck on a C language feature, go to K&R first; it is still the tightest explanation for this module's scope.
  • If you are stuck on the translation pipeline or linker behavior, go to Computer Organization and Design 2.12.
  • If K&R feels terse, open Beej's Guide for the same concept and then come back.
  • Use cppreference for edge cases and for anything C99+ that K&R does not cover.
  • Open one chunk per concept gap. Do not wander through the book.
  • If rereading does not fix the problem, stop and rewrite the concept in your own words before reading more.