C Programming
Notes on the C programming language, covering language fundamentals, compilation, and memory management.
Directory map
- C Programming Notes — language fundamentals, syntax, data types, control flow, functions, pointers
- GCC Compilation Process — the four steps: preprocessing, compilation, assembly, linking
- malloc — heap memory allocation, pointer return, common usage patterns
Summary
C is a general-purpose, low-level systems programming language developed at Bell Labs in the early 1970s. These notes cover the language as described in The C Programming Language (Kernighan and Ritchie) as well as supplementary material from FreeCodeCamp.
The compilation process section covers GCC’s four-step pipeline (preprocessing → compilation → assembly → linking) and the intermediate files produced at each step (.i, .s, .o, final executable). The memory section covers malloc for dynamic heap allocation and the relationship between pointers and allocated memory blocks.