Warning
This repository does not contain the real Rank 02 exam subjects or solutions. The PracticeShell uses classic Piscine and libft exercises, plus original exercises inspired by the exam's difficulty levels. They are great for training, but they are not the actual exam questions.
This repository is a growing bank of exercises for the C topics learned during the Piscine and the first projects of the Common Core.
The goal is to help you:
- Train the topics you learned (strings, pointers,
malloc, linked lists...) - Review your doubts and find your weak points
- Prepare for the exam by practicing under time and test pressure.
New exercises will be added over time. Each one focuses on a concept you need for the exam.
Quick Start β’ Features β’ Exam Mode β’ Practice Mode β’ Solutions
A C-based PracticeShell simulator inspired by the 42 School Common Core Rank 02 exam, combined with a collection of organized solutions grouped by difficulty level.
Clone the repository:
git clone https://github.com/SaraFreitas-dev/42-Python-PracticeShell-Rank02
cd 42-Python-PracticeShell-Rank02Build and run the PracticeShell:
make
./practiceshellYou will be presented with the main menu:
[1] Start Exam
[2] Practice Mode
[3] List all exercises
[q] Quit
No dependencies, no setup: just cc and make.
When the PracticeShell starts, it automatically creates a rendu directory. When you get an exercise, its subject appears in a subject directory, just like in the real exam. Only the current subject is there.
All exercise files should be created inside rendu, each one in a subfolder with the exercise name. The grader will only validate solutions placed in the generated workspace.
Example:
subject/
βββ ft_strlen/
βββ subject.txt
rendu/
βββ ft_strlen/
βββ ft_strlen.c
Simply create the requested file, implement your solution, and submit it through the PracticeShell interface for automatic evaluation.
The PracticeShell is the core of this repository.
It lets you practice each topic hands-on, with hidden tests and automatic feedback, instead of just reading solutions.
| Grading | Exam experience | Interface |
|---|---|---|
| Automatic grading | Random exercise assignment | Colored terminal UI |
| Hidden test cases | Progressive level system | Score tracking |
Compiled with -Wall -Wextra -Werror |
Exam & practice modes | Time tracking |
| 4 difficulty levels | Rank progression logic | Built with Makefile |
The workflow:
- Receive a subject
- Create the requested C file
- Implement the solution
- Submit for grading
- Fix failing tests
- Progress to the next level
Select:
[1] Start Exam
The simulator will:
- Assign exercises automatically
- Increase difficulty after each successful exercise
- Track your score
- Simulate a 3-hour exam session
The simulator uses a progressive difficulty system. To successfully complete the exam you must validate:
4 / 4 exercises
Select:
[2] Practice Mode
Practice Mode allows you to:
- Choose any exercise
- Focus on a specific level
- Submit unlimited times
- Train without time pressure
Solutions are organized by level. Each exercise has its own folder with the subject and the solution.
solutions/
βββ Level_1/
β βββ ft_strlen/
β βββ ft_strlen.c
β βββ subject.txt
βββ Level_2/
βββ Level_3/
βββ Level_4/
This makes it easy to study specific difficulty ranges or review previously solved exercises.
β οΈ Try each exercise in the PracticeShell first. Reading solutions before attempting them will not show you where your weak points are.
writeand string printing- String manipulation and transformations
- Argument handling (
argc/argv) - Number conversion (
atoi,itoa, binary, bases) - Bitwise operations
- Memory allocation with
mallocandfree - Splitting and joining strings
- Linked lists
- Sorting
- Recursion and grid problems
- Edge case handling
- Algorithmic thinking
This project is an independent educational tool. It is not affiliated with or endorsed by 42 School, and it does not contain any official 42 exam content.
Found a bug, a missing test case or have an idea? Feel free to open an issue.
Good luck and happy coding π



