C Programming
From printf to pointers, memory, and data structures — compile and run in your browser.
c 23 Lessons
Every lesson runs in your browser — write real code, press Run, and the tasks check themselves. Free, no account needed, with notes in English and Chinese.
Lessons in this course
- history A short history of C
- usage What C is used for
- resources Where to learn more
- setup Set up your computer
- 01 C basics: main, printf, and functions
- 02 Variables, types, and arithmetic
- 03 Booleans and selection: if, else, switch
- 04 Loops: while, for, and accumulation
- 05 Functions, parameters, and return values
- 06 Nested loops and patterns
- 07 1-D arrays: store, index, and traverse
- 08 Pointers: &, *, and pass-by-pointer
- 09 Strings: char arrays and the null terminator
- 10 Array algorithms: max, count, search, average
- 11 2-D arrays: working with a grid
- 12 Searching: linear and binary
- 13 Sorting: bubble, selection, and insertion
- 14 Recursion: base case and recursive case
- 15 Structs and typedef: . vs ->
- 16 Dynamic memory: malloc, free, and realloc
- 17 Linked lists
- 18 Stacks and queues (array-backed)
- 19 Text files: write then read
- 20 Error handling with return codes
- 21 Bits, binary, and bitwise operators
- 22 Run-length encoding (compression)
- 23 Preprocessor, const, static, and enum