C
Memory, pointers, the stack and the heap, all the way to linked lists, hash tables and your own malloc.
Foundations is free: 7 lessons.
38 lessons, 7 free
0 of 38 lessons passed
C COMPLETE
You can now:
- Write, compile and debug C programs on your own
- Explain where every value lives: stack, heap or static memory
- Use pointers, structs, malloc, realloc and free without leaks
- Read and write files and parse text input
- Build linked lists, stacks, queues and hash tables
- Spot memory bugs and undefined behaviour before they bite
Practise
The course, unit by unit
Part 1: Foundations
1 unit, 7 lessons
Part 1: Foundations
1 unit, 7 lessons
Part 2: Core
1 unit, 11 lessons
Part 2: Core
1 unit, 11 lessons
-
Unit 2: Core
5 hr 20 minBrainlag Code
- C functions and the stack, Brainlag Code
- C arrays in memory, Brainlag Code
- C strings and char arrays, Brainlag Code
- C pointers and addresses, Brainlag Code
- Pass by value in C, Brainlag Code
- C pointer arithmetic, Brainlag Code
- C checkpoint: pointersCheckpoint, Brainlag Code
- The C string library, Brainlag Code
- Reading lines of input in C, Brainlag Code
- C structs and padding, Brainlag Code
- C checkpoint: text and structsCheckpoint, Brainlag Code
Part 3: Deeper
2 units, 20 lessons
Part 3: Deeper
2 units, 20 lessons
-
Unit 3: Advanced
11 hr 35 minBrainlag Code
- C malloc, free and the heap, Brainlag Code
- Growing memory with realloc in C, Brainlag Code
- Memory ownership in C, Brainlag Code
- Pointers to pointers in C, Brainlag Code
- File input and output in C, Brainlag Code
- C checkpoint: memoryCheckpoint, Brainlag Code
- Debugging C programs, Brainlag Code
- Linked lists in C, Brainlag Code
- Stacks and queues in C, Brainlag Code
- Hash tables in C, Brainlag Code
- Function pointers in C, Brainlag Code
- Undefined behaviour in C, Brainlag Code
- C with an AI assistant, Brainlag Code
- C bug huntBug hunt, Brainlag Code
- C final challengeFinal challenge, Brainlag Code
-
Unit 4: Bits and a tiny machine
3 hr 35 minBrainlag Code
Projects
Lessons teach one idea at a time. Projects glue them together: a brief, a few milestones and a starter file.
- Bit printer40 min, 3 milestones
- Brainlag Code: Reverse a string in place40 min, 3 milestones
- Brainlag Code: Write your own malloc4 hours, 6 milestones
4 more projects
Bigger builds included in Brainlag Code
Questions
What is the course about?
How computers work. Memory, pointers, the stack and the heap, all the way to linked lists, hash tables and your own malloc. The language under your operating system. It is for: some coding helps.
What is free?
7 of the 38 lessons.
Do I need to install anything?
No. Your code runs in the browser, in the editor beside each lesson.
Do I need an account?
No. Progress saves in this browser; sign in to keep it on every device.
What can I do by the end?
- Write, compile and debug C programs on your own
- Explain where every value lives: stack, heap or static memory
- Use pointers, structs, malloc, realloc and free without leaks
- Read and write files and parse text input
- Build linked lists, stacks, queues and hash tables
- Spot memory bugs and undefined behaviour before they bite
How long does it take?
About 23 hr 20 min of lessons in 4 units. Lessons take 20 to 90 minutes each.