If you are reading this, you have likely just been accepted into the legendary Piscine at a 42 school (Paris, Kuala Lumpur, Berlin, Lausanne, or any of the 50+ campuses worldwide). You have survived the initial logic tests. You have downloaded the terminal. You have seen the "Norminette" for the first time. Now, the calendar is ticking toward a specific, dreaded date: Exam 01.
In the brutal, 28-day swimming marathon that is the Piscine, Exam 01 is the first real filter. It is not like university finals. It is not a multiple-choice quiz. It is a raw, four-hour, auto-graded race against a shell prompt.
This article will dissect everything you need to know about Exam 01 Piscine 42: the structure, the common pitfalls, the exact topics covered, and the psychological strategies used by successful cadets.
main, no printf, no <string.h>).ft_strlen, ft_putstr, ft_strcmp, ft_atoi from memory.ft_split and ft_range.Exam 01 is not just a test of C; it is a test of composure. The environment is designed to be hostile. Exam 01 Piscine 42
The Golden Piscine Rule: "If you are stuck, write a write."
Even if you cannot solve the complex recursion, can you print the arguments? Can you write a specific character? Partial points are not awarded, but simply seeing any output (even wrong output) breaks the psychological paralysis. Once you see output, you can debug.
ft_putnbr template (print integer with write)#include <unistd.h>void ft_putchar(char c) write(1, &c, 1);
void ft_putnbr(int nb) if (nb == -2147483648) write(1, "-2147483648", 11); return; if (nb < 0) ft_putchar('-'); nb = -nb; if (nb >= 10) ft_putnbr(nb / 10); ft_putchar(nb % 10 + '0');Mastering Exam 01 at Piscine 42: The Ultimate
ft_atoi (Advanced for Exam 01)Prototype: int ft_atoi(char *str);
Goal: Convert a string to an integer, handling whitespace, signs, and overflow.
Why it's hard: Requires handling of multiple states (skip spaces, read sign, parse digits). Many Pisciners see ft_atoi only in Exam 02, but some campuses include it in Exam 01.
Exercise: ft_atoi (level 2)
int ft_atoi(char *str);
' ', '\t', '\n', '\v', '\f', '\r').+ / - (only one sign allowed).long long allowed unless specified.Common mistakes:
❌ Not skipping tabs.
❌ Multiple sign characters.
❌ Stopping at first non-digit without checking sign.
Scores are posted publicly (by anonymous login ID) within hours. The passing threshold varies by Piscine session but is usually around 50–60%. A low score is not the end—the Piscine has multiple exams, and improvement is what counts. However, failing Exam 01 completely is a serious warning sign. Many who fail Exam 01 either drop out or spend the following week in intense remediation.
Conversely, passing Exam 01 with a strong score (80%+) builds real momentum. You realize: I can actually do this. Practice the exact 42-style functions (no main ,