Exam 01 Piscine 42
Reproduce these without external help:
| Exercise type | Example | Key skill |
|---------------|-----------------------------|--------------------------|
| String length | int ft_strlen(char *s) | Loops, pointer iteration |
| String copy | char *ft_strcpy(char *dst, char *src) | Pointer manipulation |
| Compare strings | int ft_strcmp(char *s1, char *s2) | Lexicographic logic |
| Print numbers | void ft_putnbr(int n) | Handling INT_MIN/positive/negative |
| Power | int ft_iterative_power(int nb, int power) | Edge cases (power=0, nb=0) |
| Prime check | int ft_is_prime(int nb) | Efficiency up to sqrt(nb) |
| FizzBuzz style| Print 1 to 100 with replacements | Modulo & conditionals |
| argv handling | ./program "hello" → print each char | Accessing argv[1] | Exam 01 Piscine 42
By the middle of Exam 01 (Levels 3 or 4), you will encounter pointers to pointers and memory allocation. Reproduce these without external help: | Exercise type
Exam 01 assumes you have been living and breathing C for the past 10–12 days. Typical exercise families include: By the middle of Exam 01 (Levels 3
What makes these “simple” exercises deceptive is the exam’s strict Norminette compliance (42’s own coding style checker) and the absolute prohibition of forbidden functions (e.g., no <string.h> allowed).
Do not jump to the hardest problem even if you think you know it. The dependency system will block you anyway. Start with Exercise 00 and get that 10 or 20 points in the bank. This builds confidence.