Passing the 42 Exam 06: What to Expect and How to Prepare
The exam is divided into levels (0 to 5). Each level unlocks the next.
| Level | Topic | Points |
|-------|-------|--------|
| 0 | Basic prompt, echo built-in, cd, pwd | 10 |
| 1 | env, export, unset, simple command execution | 20 |
| 2 | Redirections (>, <, >>) | 20 |
| 3 | Pipes (\|) | 20 |
| 4 | Environment variable expansion ($VAR, $?) | 15 |
| 5 | Signal handling, proper quotes, exit built-in | 15 | 42 Exam 06
Total possible: 100 points. Passing score = 80 (many schools require 100/100 to validate).
The exam’s memory check is aggressive. An unclosed pipe or file descriptor counts as a leak. At 42, any leak = 0. Passing the 42 Exam 06: What to Expect
Solution: Use close() on every fd returned by pipe() or open() in both parent and child. Use valgrind --track-fds=yes on your local machine.
Week 1 — Fundamentals
Week 2 — Data structures & algorithms
Week 3 — Problem patterns & edge cases Week 1 — Fundamentals
Week 4 — Full mock exams & debugging