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'."

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

Hour 2-3: The Memory Leap (Level 3)

If you get ft_range or ft_ultimate_range, take a deep breath.

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:

  1. ft_strlen – Revisiting the basics, but under pressure.
  2. ft_putstr, ft_putnbr – Simple output functions.
  3. ft_strcmp, ft_strdup – String comparisons and dynamic memory allocation.
  4. ft_atoi – Converting ASCII to integers, handling edge cases like signs and overflow.
  5. ft_strcpy, ft_strncpy – Buffer-aware string copying.
  6. ft_range – Creating integer arrays with malloc, 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