In a time dominated by LLMs, take your time to learn the grammar and write a good sonnet :)
This repository collects code and notes from antirez's C programming course.
- Lesson 1: Introduction to C Programming and Compiler
- Lesson 2: Introduction to C Programming
- Lesson 3: Variable Scope and Data Types
- Lesson 4: Functions and Data Types
- Lesson 5: Arrays and Strings
- Lesson 6: if, goto, while, recursion
- Lesson 7: while, for and switch
- Lesson 8: Game of Life
- Lesson 9: Pointers
- Lesson 10: Pointer Operations
- Lesson 11: String Manipulation and Pointers Casting
- Lesson 12: Dynamic Memory and Pre-Fixed Length String
- Lesson 13: Memory Management and Pre-Fixed Length String Optimization
- Lesson 14: Structures
- Lesson 15: File I/O and Linked Lists
- Lesson 16: Structures and Reference Counting
- Lesson 17: Structures Layout and Hexdump
- Lesson 18: Type Definitions and File I/O Operations
- Lesson 19: System Calls and Low-Level File Operations
- Lesson 20: I/O Buffering and Memory Mapping
- Lesson 21: Unions and Bitfields
- Lesson 22: Function Pointers and Callback Functions
- Lesson 23: Toy Forth 01
- Lesson 24: Toy Forth 02
- Lesson 25: Toy Forth 03
- Lesson 26: Toy Forth 04
- Lesson 27: Toy Forth 05
- Lesson 28: Variadic Functions
- Lesson 29: Toy Forth 06
- Arrays - Lesson 5, 7
- ASCII values - Lesson 5, 11
- Assembly generation - Lesson 1
assert- Lesson 26atoi()- Lesson 24
- Bitfield - Lesson 21
- Blocks - Lesson 6, 7
- Break statements - Lesson 6, 7
- Buffering - Lesson 20
- Callback functions - Lesson 22
- Character variables - Lesson 5
- Compilation process - Lesson 1
- Casting - Lesson 10, 11
- Command line arguments - Lesson 15
- Data types - Lesson 3, 4
- Define directive - Lesson 8
- Dynamic Memory - Lesson 12
- Error handling - Lesson 19
errno- Lesson 19
fflush()- Lesson 20- File descriptors - Lesson 19
- File inclusion - Lesson 1
- File I/O operations - Lesson 15, 18, 19, 20
fopen() fgets() fclose()- Lesson 15- Format specifiers - Lesson 2, 3, 4, 5
- For loops - Lesson 7
fread()- Lesson 18free()- Lesson 12, 13fseek()- Lesson 24- Functions - Lesson 1, 2, 4, 6, 9
- Function pointers - Lesson 22
- Game of life - Lesson 8
- Global variables - Lesson 3
- Goto statements - Lesson 6, 7, 28
- Hexdump - Lesson 17
- If statements - Lesson 6, 7
- Integer types - Lesson 3, 4
- Local variables - Lesson 3, 7
- Loops - Lesson 6, 7
- Magic numbers - Lesson 16
malloc()- Lesson 12memcmp()- Lesson 27memcpy() memset()- Lesson 17, 24- Memory mapping - Lesson 20
mmap- Lesson 20
open()- Lesson 19
- Pass-by-value - Lesson 3
perror()- Lesson 19printf()- Lesson 1, 3- Pointers - Lesson 8, 9, 10, 11, 12, 13
- Prefix length string - Lesson 11
qsort()- Lesson 22
read()- Lesson 19realloc()- Lesson 24- Recursion - Lesson 6, 25
- Reference Counting - Lesson 16,26
sizeof()- Lesson 4sleep()- Lesson 20- Static variables - Lesson 3
- Strings - Lesson 5, 11
- Structures - Lesson 14, 15, 16
- Structures alignment - Lesson 16
- Switch statements - Lesson 7
- System Calls - Lesson 19
- Terminal control - Lesson 4
- Ternary operator - Lesson 17
tolower()- Lesson 28- Toy Forth - Lesson 23, 24, 25, 26, 27, 29
- Type conversion - Lesson 5
typedef- Lesson 18- Type promotion - Lesson 3
- Unions - Lesson 21, 23
usleep()- Lesson 20
va_list,va_start(),va_arg(),va_end()- Lesson 28- Variables - Lesson 1, 2, 3
- Variadic functions - Lesson 28
vprintf(),vsnprintf()- Lesson 28
- While loops - Lesson 5, 6, 7
write()- Lesson 20