Exam 01 Piscine 42 [portable] Review
Exam 01 at the 42 Network is the first major psychological hurdle of the "Piscine" (the intensive four-week selection "pool"). It’s a four-hour test in a controlled, internet-free environment designed to see if you’ve actually learned anything during your first grueling week of Shell and C programming. The Story of the "Exclamation Mark" Panic Imagine it’s Friday afternoon at 42 Paris or 42 Berlin
. You’ve spent five days surviving on coffee and peer-to-peer debugging. The "Grizzlies" (student volunteers) crank up motivational music to ease the tension, but your hands are still shaking as you log into the custom Linux exam environment. You type the dreaded command: examshell.
Hour 0-1: The Warmup (Level 0 & 1)
Do not panic. The first exercise is usually a free point. For example:
"Write ft_print_alphabet.c that displays 'abcdefghijklmnopqrstuvwxyz'."
- Action: Type your code. Compile with
gcc -Wall -Wextra -Werror. Test once. Submit. - Warning: Read the prompt. Does it say "with newline" or "without newline"? Reading comprehension is 50% of the test.
Introduction
The Piscine is an intensive, project-driven coding bootcamp used by the 42 network to evaluate candidates’ problem-solving, collaboration, and coding endurance. "Exam 01" usually functions as an early, timed assessment that checks whether a student can apply basic programming concepts under pressure, work with the UNIX environment, and follow project constraints. Exam 01 Piscine 42
5. Time Management
- Practice Under Timed Conditions: Make sure to simulate exam conditions when you practice. This helps you manage your time effectively and gets you used to working under pressure.
- Prioritize Questions: Learn to prioritize questions. If you get stuck, move on and come back later if you have time.
Hour 2-3: The Memory Leap (Level 3)
If you get ft_range or ft_ultimate_range, take a deep breath.
- Key Code Template for ft_range:
int *ft_range(int min, int max) int *range; int i; int size;if (min >= max) return (NULL); size = max - min; range = (int *)malloc(sizeof(int) * size); if (!range) return (NULL); i = 0; while (min < max) range[i] = min; min++; i++; return (range);
Key Topics Covered
Exam 01 assumes you have been living and breathing C for the past 10–12 days. Typical exercise families include:
ft_strlen– Revisiting the basics, but under pressure.ft_putstr,ft_putnbr– Simple output functions.ft_strcmp,ft_strdup– String comparisons and dynamic memory allocation.ft_atoi– Converting ASCII to integers, handling edge cases like signs and overflow.ft_strcpy,ft_strncpy– Buffer-aware string copying.ft_range– Creating integer arrays withmalloc, a first taste of heap memory.
What makes these “simple” exercises deceptive is the exam’s strict Norminette compliance (42’s own coding style checker) and the absolute prohibition of forbidden functions (e.g., no <string.h> allowed).
Step 7: The "Hail Mary" Strategy
If you are completely lost on a higher exercise (e.g., ft_atoi), write a skeleton: Exam 01 at the 42 Network is the
int ft_atoi(char *str)
return (42);
This will fail all tests, but it satisfies the compiler. However, do not rely on this—Moulinette will give 0.
6. 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.
6. Stay Healthy
- Get Enough Sleep: Ensure you get a good night’s sleep before the exam to be well-rested.
- Eat Well and Stay Hydrated: On the day of the exam, eat a nutritious meal and stay hydrated.