Exam 01 Piscine 42 Exclusive 🎯 🎯
Exam 01 of the 42 Piscine is your first major practical test, typically held on the Friday of your first week. It is designed to evaluate your baseline understanding of C programming (moving past the initial Shell days) and your ability to work under pressure without peer help. 1. Exam Mechanics
Environment: You log into a restricted Linux environment using a specific examshell command. You cannot access the internet, your previous work, or your peers.
The "Level" System: The exam is linear. You receive one exercise at a time. You must pass the current exercise (submit and wait for the "Grade: 100") before the system unlocks the next one.
Failures: If you fail an exercise, you can try again, but there is often a time penalty that increases with each failure.
Grading: The exam is graded automatically. Unlike your daily projects, Norminette (the 42 coding standard) usually does not count toward your exam score, but your code must compile and be functionally perfect. 2. Core Topics to Master
To succeed in Exam 01, you should be comfortable with everything from C00 and C01. Key concepts often include:
Basic Output: Using the write function to display characters or strings (e.g., creating a program that just prints 'z').
Variable Types: Understanding char, int, and basic arithmetic.
Loops: Mastering while loops is critical for traversing strings or repeating actions.
Pointers: Basic pointer manipulation (e.g., ft_swap or ft_strlen).
Conditional Logic: Using if/else statements for logic gates. 3. Common First-Exam Exercises
While tasks are randomly assigned, common early-level questions include: only_z: Simply write a program that displays 'z'.
ft_print_alphabet: Write a function that displays the alphabet in lowercase.
ft_strlen: Write a function that counts and returns the length of a string. ft_putstr: Write a function that displays a string. ft_countdown: Display digits from '9' to '0'. 4. Strategy for Success
The Exam 01 in the 42 Piscine is the second major milestone of the selection process, typically held on the second Friday of the intensive four-week coding bootcamp. Unlike the first exam (Exam 00), which often focuses on basic terminal commands and shell scripting, Exam 01 is widely considered the true "intro to C" test. Key Logistics & Rules
The exam environment is highly restricted to ensure that candidates rely only on their own knowledge:
The Examshell: You must log into a dedicated Examshell environment that locks your computer to a specific terminal-based session.
No Internet or Peer Help: All external communication is prohibited. You cannot use search engines or ask peers for help during the session.
The grademe Command: To submit a solution, you must use the grademe command. An automated grader (the "Moulinette") immediately tests your code.
Sequential Progression: You must pass Level 0 to unlock Level 1. If you fail a question, you may be given a different question of the same level, but you cannot proceed until you pass the current one.
No Norminette: Interestingly, the standard "42 Norm" (strict formatting rules) usually does not apply during exams—the code only needs to work and compile. Core Topics to Master
To succeed in Exam 01, you should be comfortable with the concepts covered in the C00 through C04 modules:
The Psychological Exclusive: The "Exam 01 Mindset"
42 exams are not just technical; they are psychological warfare. Here is the exclusive psychological profile of a student who passes Exam 01:
- They ignore the timer. The exam is 4 hours.
ft_putstrtakes 5 minutes to write. The remaining 3h55m is for debugging and relaxing. Do not rush. - They embrace the "white screen". You will stare at a blinking cursor for 20 minutes. That is normal. Breath, draw the pointer logic on paper.
- They use
grademesparingly. Eachgrademeruns the Moulinette, which can take 30 seconds. If you spam it, you waste time. Instead, compile manually:
Then rungcc -Wall -Wextra -Werror ft_putstr.c./a.outwith your own main. Only usegrademewhen you are 90% sure.
4. The Exclusive Cheat Codes (Mental Models)
🚨 Common Mistakes to Avoid
- Newlines: Forgetting
\nis the #1 cause of failure. Always check if the output requires a newline at the end. - Arguments: Always check
if (argc == 1)orif (argc < 2). If the program expects arguments and receives none, it usually should output only a newline. - Filename: The exam requires an exact filename (e.g.,
aff_a.c). If you name itAff_a.c, the grading script will fail. - Compilation Flags: The exam compiles with
gcc -Wall -Wextra -Werror. Your code must not have warnings. Unused variables are warnings! - Main Return: Always
return (0);at the end of main.
Phase 5 – Last hour
ft_print_combn is the hardest. Only attempt if you already have 4+ exercises correct. Use a backtracking function with a start parameter.
5. Edge Cases and Testing
| Case | a | b | Expected | Result | |----------------|-------|-------|----------|--------| | Both zero | 0x00 | 0x00 | 0x00 | pass | | Same non‑zero | 0xFF | 0xFF | 0x00 | pass | | Complement | 0x0F | 0xF0 | 0xFF | pass | | Single bit | 0x01 | 0x00 | 0x01 | pass | | Arbitrary | 0x5A | 0x3C | 0x66 | pass |
Test harness (not submitted, but used for validation): exam 01 piscine 42 exclusive
#include <stdio.h>
int main(void)
printf("%02x\n", ft_exclusive(0x5A, 0x3C)); // should print 66
return (0);
Final tips
- Keep calm: methodical debugging beats panic.
- Use incremental development: compile and test often.
- Prioritize correctness then clarity.
- Sleep and nutrition matter before exam day — cognitive stamina helps.
If you want, I can:
- Draft a printable 1-page checklist for Exam 01 day.
- Create 3 timed practice tasks modeled on common exam problems (with solutions).
- Convert this into a short social post or newsletter blurb.
Which follow-up would you like?
42 School Piscine Exam 01 is a high-stakes, 4-hour technical challenge that serves as the second major test in the intensive C programming bootcamp. While Exam 00 covers the basics of the shell and simple functions, Exam 01 adds command-line arguments ( and more complex logic. The Story: A Friday in the Cluster 1. The Pre-Exam Tension
Friday at 42 is "Exam Day." The energy in the cluster shifts from collaborative chaos to a heavy, nervous quiet. At exactly 2:00 PM, all students are logged out, and the machines reboot into a specialized, restricted Linux environment. You have exactly 10 minutes to log in to the
using the generic "exam" credentials; failure to do so results in an immediate 0. 2. Entering the Exam Shell Once you launch the
command, the real game begins. The interface is text-only. You must log in again with your personal intranet ID and password. The environment is designed to be isolated—no internet, no notes, and no peer help. 3. Solving Level by Level
The exam is structured like a video game: you must pass one exercise to unlock the next.
Often a basic output task, such as printing the last command-line argument using only the Level 1-2:
Tasks move into string manipulation, such as writing your own version of (string copy) or (string comparison).
If you fail an exercise, you might be given a different task at the same difficulty level, but it will be worth fewer points. 4. The Dreaded
To submit your work, you move your C file into the designated folder, commit it, and type in the shell. Then, you wait. The Moulinette
(the automated grading system) tests your code against edge cases. If there is even one extra space or a minor logic flaw, it returns a "FAILURE" message, and your score for that attempt remains 0. 5. The Aftermath
At 6:00 PM, the session ends abruptly. For many, the first exam is a lesson in humility, with some students scoring as low as 30 due to stress or minor syntax errors. However, at 42, failure is part of the curriculum—the school looks for resilience and growth over the four weeks rather than perfect scores on day one. Summary of Key Exam 01 Topics Focus Area Basic Logic Loops, conditionals, and character manipulation Command Line to process inputs Iterating through arrays and handling the null-terminator ( System Calls Outputting data exclusively using the Are you preparing for a specific exercise like for your next exam? 42-piscine/README.md at main - GitHub
8. Conclusion
The exclusive problem in Exam 01 of 42 Piscine tests basic bitwise logic, function prototyping, and adherence to coding restrictions. The simplest correct solution uses the built‑in XOR operator. If the operator is forbidden, a bit‑iteration approach with logical operations substitutes correctly. Mastery of this problem indicates readiness for more complex bitwise and memory‑constrained exercises.
Appendix: Full code (forbidden‑operator version)
unsigned char ft_exclusive(unsigned char a, unsigned char b) unsigned char res; int i;res = 0; i = 0; while (i < 8) if (((a >> i) & 1) != ((b >> i) & 1)) res return (res);
Last updated: Piscine 202X standard.
Exam 01 of the 42 Piscine is often described as the "wake-up call" following the chaotic first week of Shell exercises. It is the second exam in the sequence (after Exam 00) and usually takes place on the second Friday. The Experience: "The First Real Test"
For many "swimmers," Exam 01 is where the reality of the C language truly sets in. While Exam 00 often involves basic Shell commands or environment setup, Exam 01 requires writing functional C code under strict time pressure.
The Psychological Barrier: Participants often report feeling a mix of frustration and "power" after the exam. It is common for students to fail early exams due to "stupid things" they thought they knew but couldn't reproduce without resources.
The Environment: The exam is held in a "cluster" (computer lab) under strict rules. There is no internet access, no peer help, and no personal notes—just the student, the terminal, and the automated grading system. Common Challenges & Content
Exam 01 of the 42 School Piscine is typically held on the second Friday of the intensive four-week coding bootcamp. It serves as a critical progress check, often shifting focus from command-line (Shell) exercises to foundational C programming. Core Expectations and Content
The exam tests your ability to solve logic and programming problems under time pressure without external resources.
Key Topics: You are expected to have mastered concepts like loops, conditional statements, arrays, and strings before this stage. Exam 01 of the 42 Piscine is your
Specific Skills: Topics often covered in or leading up to Exam 01 include handling command-line arguments (argc and argv), dynamic memory allocation (malloc and free), and pointer manipulation. Sample Problems: Past exam repositories list tasks such as:
search_and_replace: Replacing characters in a string based on specific arguments.
rostring: Rotating a string so the first word becomes the last.
only_z: Simple output tasks to test basic program structure. The "Survival" Experience 42 Abu Dhabi – Piscine Day 11 (Exam01)
Exam 01 of the 42 Piscine is the first significant test of your survival skills in the intensive coding bootcamp.
This four-hour exam typically assesses your ability to master the basics of the Shell (Bash) and the initial concepts of the C programming language under strict, isolated conditions Key Exam Rules and Environment Total Isolation:
No communication with peers, no internet access, and no music or phones are allowed. Zero Tolerance:
If a phone rings in the cluster, the entire row may be disqualified and kicked out immediately. Grading Machine: You are graded by a program called the Moulinette
(or Deepthought). It requires perfect adherence to file names, function names, and paths. Sequential Success:
The grading is often "all-or-nothing" for progress; if you fail an early exercise, the following ones may not be graded. Common Exercise Topics
Expect exercises similar to your first few days of projects (Shell00 to C01). Basic Output: Programs like that simply display a character using the Character/String Manipulation:
Displaying the alphabet, strings, or manipulating ASCII values. Pointers and Values: Simple C functions like (setting a pointer to 42) or (swapping two integer values). Math Operations:
Division and modulo operations, often using pointers to store multiple results. Pro Tips for Success
Surviving Exam 01: The First Real Test of the 42 Piscine The first Friday of the 42 Piscine is a rite of passage. After a whirlwind week of Shell projects and your first brush with C, you face Exam 01—the moment the training wheels come off. This exam isn't just about code; it’s about your ability to perform under pressure in a custom Linux environment without the safety net of your peers. What to Expect: The Format
Unlike the daily projects, the exam takes place in a controlled setting called the examshell. Time Limit: Typically 4 hours (usually from 2 PM to 6 PM).
Progression: Exercises are presented one by one. You must pass the current exercise to unlock the next. If the Moulinette (the automated grader) finds even a minor error, you get a 0 for that task and cannot proceed until it's fixed.
Zero Resources: No internet, no notes, and no help from neighbors. It's just you, your terminal, and your memory. Key Topics for Exam 01
Exam 01 focuses on the fundamental building blocks you’ve been grinding all week. Ensure you are comfortable with:
Argc & Argv: Handling command-line arguments is a major addition for this exam.
The Basics: Expect tasks involving write, loops (while loops only—for is forbidden), and basic if-else conditionals.
String Manipulation: Functions similar to ft_strlen, ft_putstr, or basic character comparisons are common at this level.
Classic Problems: Be ready for the infamous FizzBuzz or simple mathematical displays. Pro-Tips for Success
Master the Login: You have exactly 10 minutes to log into the exam system. If you fail to log in within that window, you automatically fail the exam. Practice your credentials!
No Norminette Required: Interestingly, the strict 42 "Norm" is usually not enforced during exams, and you don't need the standard header. Focus on functional, clean code.
Use grademe Wisely: Once you push your code to the rendu directory, use the grademe command to trigger the grading. Read the traces (error logs) carefully if you fail; they are your only guide to what went wrong. They ignore the timer
Vim is Your Friend: You might not have access to VS Code. Being proficient in Vim basics ensures you aren't fighting your editor during the test. The Mindset: It’s Okay to Fail
Many "Pisciners" fail their first exam. The goal is to show progress. Use this time to experiment and see how you handle the "Deepthought" grading system. If you get stuck, don't give up—every minute spent debugging in that high-pressure environment is where the real learning happens. 42 Piscine - Diving In My First Week - DEV Community
Mastering Exam 01: The First Real Test of the 42 Piscine The 42 Piscine is legendary for its "swim or sink" philosophy. While the daily C projects build your muscles, the Exam 01 is where the training wheels officially come off. If you’re searching for an exclusive look at how to conquer this milestone, you’ve come to the right place.
Exam 01 isn't just about coding; it’s about performing under pressure without the help of your peers or Google. Here is everything you need to know to pass. 1. The Environment: Total Isolation
When you log into the exam machine, the atmosphere shifts. The "Moulinette" (42’s automated grading system) becomes your only judge.
No Internet: You have no access to documentation, Stack Overflow, or GitHub.
The Exam Shell: You’ll use a specific command-line interface to fetch assignments (grademe) and submit them.
Time Pressure: You usually have 4 hours. Every minute counts. 2. What’s on the Menu? (The Syllabus)
Exam 01 typically covers the fundamentals found in C Discovery (Piscine C00 through C04). You can expect problems ranging from basic display to string manipulation. Common tasks include:
Level 0: Simple output like ft_putchar or ft_print_alphabet. Level 1: Basic logic like ft_putstr, ft_strlen, or ft_swap.
Level 2: String manipulation and loops, such as ft_strcmp, ft_strrev, or inter.
Level 3: More complex logic like ft_atoi, epur_str, or wdmatch. 3. The "Exclusive" Strategy for Success
To pass Exam 01, you don't need to be a genius; you need to be meticulous. A. The "Grademe" Rhythm
The exam uses a leveling system. You start at Level 0. Once you pass a level, you move to the next. If you fail a level, the system might give you a different problem of the same difficulty, but there is often a waiting period (cooldown) before you can try again.
Tip: Never submit code that you haven't compiled and tested yourself with multiple edge cases. A single "Fail" can cost you 20 minutes of waiting time. B. Directory Structure is King
The Moulinette is a robot. If you name your file ft_putstr.c but the subject asked for ft_put_str.c, you fail. If you put it in the wrong folder, you fail.
Action: Double-check your directory names and filenames three times before typing grademe. C. Master the Standard Functions
Since you can't use printf (unless allowed) or other libraries, you must be comfortable with write. Practice writing your own header files and understanding how to link them if necessary, though most exam problems are standalone .c files. 4. Common Pitfalls to Avoid
The "Bus Error" or "Segmentation Fault": These usually happen in string manipulation levels. Always check for null terminators (\0) and ensure you aren't accessing memory outside your array.
Infinite Loops: Ensure your while loops have a clear exit condition.
Forbidden Functions: If the subject says "Allowed functions: write," and you use strlen, you will get a 0. 5. How to Prepare
Re-do C00 - C04: Don't just finish them; re-do them from scratch without looking at your previous notes.
Study inter and union: These two problems are classic Exam 01 hurdles. They test your ability to handle two strings and nested loops.
Mock Exams: Use community-created "Exam Trainers" (available on GitHub) to simulate the exam environment at home. Final Thought
Exam 01 is designed to see if you actually understood the logic behind the code you've been "copy-pasting" or "peer-editing" all week. It is the gatekeeper of the Piscine. Stay calm, test your code thoroughly, and remember: The Moulinette is always right.
6. Common Pitfalls
- Using
printforstdlib– instantly fails the norm. - Forgetting
unsigned char– usingintmay work but violates the prototype. - Infinite loop – in bit‑by‑bit version, forgetting to increment
i. - Bit shift on signed char – can lead to implementation‑defined behavior.
- Assuming XOR operator is allowed – always read the forbidden functions list.
- Off‑by‑one in bit loop – iterate
0to7, not1to8.