This repository contains a complete set of exercises to practice for 42's Exam Rank 02, covering all levels from Level 1 to Level 4.
It includes:
- π Subjects for every exercise
- β Fully working C solutions
- π Organized level-based folders
- π― A complete training resource for realistic exam preparation
During the real exam, one random exercise is selected from each level.
This repository allows you to practice every possible exercise that may appear.
Below is a complete overview of all included levels and exercises.
| Level 1 | Level 2 | Level 3 | Level 4 |
|---|---|---|---|
| first_word | ft_atoi | epur_str | fprime |
| fizzbuzz | ft_strdup | expand_str | sort_int_tab |
| ft_strlen | ft_strcmp | rstr_capitalizer | rev_wstr |
| ft_strcpy | ft_strcspn | str_capitalizer | rostring |
| ft_putstr | ft_strspn | hidenp | ft_split |
| ft_swap | ft_strpbrk | add_prime_sum | flood_fill |
| repeat_alpha | ft_strrev | pgcd | sort_list |
| rev_print | max | lcm | ft_list_foreach |
| rotone | is_power_of_2 | paramsum | ft_list_remove_if |
| rot_13 | print_bits | tab_mult | |
| search_and_replace | reverse_bits | ft_range | |
| ulstr | swap_bits | ft_rrange | |
| alpha_mirror | ft_list_size | ||
| snake_to_camel | ft_atoi_base | ||
| camel_to_snake | print_hex | ||
| wdmatch | |||
| union | |||
| do_op | |||
| last_word |
Each subject.txt file contains the original exam-style description,
and each associated .c file contains a complete C implementation.
This repository exists to help students:
- Practice efficiently for Exam Rank 02
- Understand the patterns behind common exam exercises
- Improve their C logic, recursion, pointer handling, and string manipulation
- Access all subjects and solutions in one clean place for practice purposes
To compile the exercises:
- GCC or Clang
- Standard C libraries
To compile:
gcc -Wall -Wextra -Werror exercise.c && ./a.outExample to compile and test:
gcc -Wall -Wextra -Werror first_word.c./a.out "a" "b" | cat -e