Exam 01 of the 42 Piscine typically focuses on handling command-line arguments (argc/argv) and building upon basics like loops and logic. Because the exam system is randomized for every student, there is no single "paper," but rather a set of potential problems across different difficulty levels. 📋 Exam Structure & Logistics Duration: Usually 4 hours.
System: You log in via examshell using "exam" as the username and password.
Levels: Questions progress from Level 0 to Level 4+; you must pass a level to advance.
Grading: Submit using the grademe command; you can only move on if your code passes the automated tester. 🧠 Core Topics & Requirements
Command Line Arguments: Understanding how to use argc and argv is critical for most Level 1+ problems.
Standard Output: Proficiency with the write function (as printf is usually forbidden).
Data Types: Managing strings (char arrays) and basic integer arithmetic.
Memory: Basic understanding of the stack; malloc is generally not needed until Exam 02. 🛠️ Common Problem Types
Below are examples of problems frequently seen in Level 0 and Level 1 repositories: Level 0 (Basics): only_a / only_z: Print a single character and a newline.
maff_alpha: Print the alphabet with alternating cases (e.g., aBcDe...). Level 1 (Manipulation): ft_swap: Swap the values of two integers using pointers.
rot_13 / rotone: Shift characters in a string by a specific number of positions.
search_and_replace: Replace all occurrences of one character with another in a string. Higher Levels:
rostring: Rotate a string so the first word becomes the last. first_word: Display the first word of a given string. 💡 Strategy Tips
Exam 01 of the 42 Piscine is the second weekly assessment during the intensive 4-week selection process. Unlike Exam 00, which focuses on absolute basics, Exam 01 introduces command-line arguments and more complex logic. Core Topics Covered
Exam 01 typically builds on everything from the first week and adds new mechanics: Command-Line Arguments : Heavy focus on Basic C Logic : Continued use of loops ( ), conditionals ( ), and basic types. Strings & Arrays : Basic manipulation and iteration through characters. : Initial exercises involving pointer manipulation (e.g., Common Exam Exercises Tasks are randomized, but frequently include: : Simple programs using to display a single character.
: A function to swap the values of two integers using pointers. : Writing a function that outputs a string to the console.
: A classic program that prints "Fizz", "Buzz", or "FizzBuzz" based on multiples of 3 and 5.
: Advanced tasks involving rotating words in a string provided via command-line. The "Exam Shell" Environment
The exam takes place in a restricted environment known as the Foullane-Mohamed/1337-Piscine-42-main-exercice-and-exame
Diving into the Depths of Code: My Experience with Exam 01 Piscine 42
As I embarked on the journey to tackle Exam 01 Piscine 42, I knew I was in for a challenge. Piscine, a crucial part of the 42 curriculum, is designed to push students out of their comfort zones and into the depths of coding. My experience with Exam 01 was a rollercoaster of frustration, learning, and ultimately, accomplishment. Exam 01 Piscine 42
The Initial Dive
The exam began with a straightforward introduction to the piscine environment, where we were tasked with completing a series of exercises that would test our basic coding skills. I dove headfirst into the challenges, only to find myself stuck on what seemed like simple problems. The piscine's strict rules and time constraints added to the pressure, making it difficult to think clearly.
The Struggle is Real
As I progressed through the exam, I encountered more complex problems that required critical thinking and creative problem-solving. My mind went blank, and I struggled to find the right approach. The clock was ticking, and I felt like I was drowning in a sea of code. It was then that I realized I needed to take a step back, breathe, and reassess my strategy.
Finding My Buoyancy
The turning point came when I decided to focus on understanding the concepts rather than just memorizing solutions. I revisited the basics of programming, re-examining data structures, algorithms, and coding best practices. As I gained a deeper understanding of the material, I began to feel more confident in my abilities. The problems that once seemed insurmountable now appeared manageable.
The Breakthrough
With renewed momentum, I tackled the challenges with a fresh perspective. I started to break down complex problems into smaller, more manageable parts, and I began to see the connections between different concepts. The code started to flow more naturally, and I found myself enjoying the process of solving the puzzles.
The Finishing Touches
As I neared the end of the exam, I felt a sense of accomplishment wash over me. The problems that had once seemed so daunting now felt like a breeze. I submitted my work, feeling proud of the progress I had made.
Takeaways
Reflecting on my experience with Exam 01 Piscine 42, I realized that:
Conclusion
Exam 01 Piscine 42 was a challenging yet rewarding experience that pushed me to grow as a coder. I learned the importance of patience, persistence, and a deep understanding of programming concepts. As I continue on my journey at 42, I'm excited to tackle the next challenge, knowing that I have the skills and resilience to overcome any obstacle.
An interesting feature of in the 42 Piscine is the "First Blood" pressure
, where the automated grading system (the Moulinette) creates a high-stakes environment where your first ever "real" grade in the program is determined by absolute precision.
Here are a few unique aspects that make Exam 01 a defining moment for "Pisciners": The "VOG-SPHERE" Isolation
: Unlike the daily rushes where you can collaborate, Exam 01 is your first time being completely cut off. You are pushed to a specific seat, all external internet is blocked, and you must rely entirely on your own memory of the syntax and shell commands learned in the first week. The Leveling System
: The exam uses a "level" mechanic. You start at Level 0 with a very simple task (like displaying a character). If you pass, you move to Level 1. If you fail a level, the system often gives you a
problem of the same difficulty, preventing you from simply memorizing a specific solution. The "0 or 100" Rule Exam 01 of the 42 Piscine typically focuses
: There is no partial credit. If your code has a single extra space in the output or a minor memory leak, the Moulinette gives you a 0 for that exercise. This forces a mindset shift from "it mostly works" to "it is technically perfect." Psychological Barrier
: For many, Exam 01 is the first time they realize that the Piscine isn't just about coding—it's about stamina. Seeing peers leave the cluster early (either because they finished or gave up) creates a unique mental challenge while you are trying to debug a pointer. specific C concepts are usually tested in this first exam to help you prepare?
For many "Pisciners" at 42 School, Exam 01 is the first true moment of truth. While the previous week's projects (Shell00 to C01) provide a taste of the learning curve, the first Friday exam is where the pressure of a timed, isolated environment truly begins. What is Exam 01?
Exam 01 is a four-hour practical coding test held every Friday during the Piscine. It is designed to test your mastery of basic C programming concepts, specifically focusing on what you should have learned during the first week and a half of the program.
Unlike the projects where you can ask peers for help, the exam is strictly solo. You are placed in a controlled "exam mode" environment on a Linux machine with no internet access and no external resources. Key Topics to Master
The difficulty of the exam is cumulative. To succeed in Exam 01, you should be comfortable with:
The Basics: Recreating standard library functions like ft_putchar or ft_putstr using only the write function.
Control Flow: Mastering if/else statements and while loops for simple logic.
Strings and Arrays: Handling character arrays, which are the bread and butter of the early Piscine.
Command Line Arguments: A common "gatekeeper" topic for Exam 01 is understanding argc and argv to write programs that respond to terminal input.
Functions vs. Programs: Knowing when a subject asks for a function (do not include main) versus a program (must include main and be compilable). The Exam Environment: How It Works
Accessing the exam is an exercise in following instructions ("RTFM"):
Login: You log into the machine with a special exam username and password. Launch: You open a terminal and run the examshell command.
The Process: You receive one exercise at a time. You must solve it, push it to the rendu directory, and run grademe to have it checked by the "Moulinette" (the automated grading system).
Progression: You only see the next exercise if you pass the current one. If you fail, the point value for that exercise often decreases on the next attempt. Expert Tips for Passing
42-Piscine-C/Exam/Exam01/4-0-rostring/subject.en.txt at master
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
: 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 Patience and persistence are key : Don't be
: The exam environment is isolated, often lasting several hours, which can cause significant stress even if the logic seems simple. Automated Correction
: 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
The first exam of the 42 Piscine (Exam 01) typically takes place at the end of the first week and covers the fundamental C programming concepts introduced in projects like C00 and C01. Exam Basics
Environment: You must log in with the exam user and run the examshell command to begin [0.5.6, 0.5.11].
Submission: Use the command grademe within the examshell to submit your code for correction [0.5.8].
Rules: Unlike standard projects, you do not need the 42 Header or to run Norminette during exams [0.5.8]. Common Level 0 & 1 Exercises These are frequent starting tasks for the first exam:
only_z: Write a program that displays only the character 'z' on the standard output [0.5.5].
ft_print_alphabet: Create a function that displays the lowercase alphabet in ascending order [0.5.1, 0.5.3].
search_and_replace: A program that takes a string and two characters, replacing every instance of the first character with the second [0.5.14].
first_word: A program that displays the first word of a given string [0.5.22]. Preparation Tips
Master write: Most early exam problems require you to use the write function from the library [0.5.5].
Practice VIM: You may not have access to VS Code or other IDEs during the exam, so being comfortable with VIM is critical [0.5.8].
Handle Failures: If you fail a question, you may have to wait for a "timeout" before the next attempt, and you might receive a different question entirely.
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.
Beyond the technical checklist, Exam 01 is a lesson in:
ft_strlenPrototype: int ft_strlen(char *str);
Goal: Return the number of characters in a string (excluding the null terminator \0).
Common pitfall: Infinite loops due to forgetting the \0 check.
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');
Some students waste time on a level 03 they can't solve → missing easy points from level 00–01.
write, malloc, etc.)