Exam 01 Piscine 42 Guide

Exam 01 of the 42 Piscine is generally considered a "reality check" for participants. While the first exam (Exam 00) is often a baseline, Exam 01 introduces higher complexity and tests whether you have truly mastered the basics of C programming and memory management. Core Focus Areas Fundamental C Logic : You must be able to write basic loops ( ) and conditional statements ( ) instinctively without reference materials. Pointers and Memory

: This exam typically starts testing your understanding of pointers and address manipulation, which are common hurdles for beginners. String Manipulation : Be prepared to recreate basic functions like from scratch. Norminette Compliance

: Your code must strictly follow the school's coding standards (the "Norm"), or it will fail automatically. Key Challenges Strict Grading Exam 01 Piscine 42

: If your first exercise fails, the entire exam ends immediately for you (the "fail-fast" system). Every semicolon and space must be perfect. Time Pressure

: The exam environment is isolated, often lasting several hours, which can cause significant stress even if the logic seems simple. Automated Correction Exam 01 of the 42 Piscine is generally

: Your work is corrected by a program (often called "Moulinette"), meaning there is zero room for negotiation on errors like "too many bytes allocated" or missing files. Recommended Study Resources

ayoub0x1/C-Piscine-exam: Get ready for your 1337 ... - GitHub Common Mistakes That Cause Immediate KO


Common Mistakes That Cause Immediate KO

  1. Missing Header: Every file must have: #include <unistd.h> (for write) or #include <stdlib.h> (for malloc). Forgetting this is an instant KO.
  2. Function Name Typo: The prompt says ft_putstr. You write ft_putstrr. Moulinette does not guess.
  3. Unused Variables: The Norm forbids unused variables. Remove them.
  4. Segfaults: If your program crashes, the grader stops. Always check for NULL returns from malloc.
  5. Leaks (Experimental): Some exams now have a memory leak checker. If you malloc and don't free, you might pass functionality but fail the "Leak" test.

The "Norm" Nightmare: Why Your Code Fails Even When It Works

The most frustrating part of Exam 01 is The Norminette. 42 has a strict coding standard (The Norm).

If your code solves the problem perfectly but has 26 lines, or uses a for loop, the Moulinette will mark it KO (Norme Error). Pro Tip: Before you upload your ex01/ folder, run norminette -R CheckForbiddenSourceHeader . in your terminal. If it yells, fix it.

Write-Up: Exam 01 – 42 Piscine

3. String Manipulation (Without <string.h>)

You will be required to re-implement core string functions:

2. Start with the easiest exercise regardless of points

Some students waste time on a level 03 they can't solve → missing easy points from level 00–01.