AI Image & Video Generator: Try Pollo AI - All the great AI video & image models in ONE place!

Try Free

C Piscine Exam 01 | Fixed

The C Piscine Exam 01 primarily tests your foundational understanding of the C programming language, specifically the concepts introduced in modules C 00 and C 01. While the very first exam (often called Exam 00) might include Shell questions, Exam 01 is firmly focused on C logic. Key Exam Topics

Pointer Manipulation (C 01): Understanding how to modify a variable's value through its address (e.g., ft_ft), handling double pointers, and basic arithmetic with pointers. c piscine exam 01

Strings are arrays of characters.

// WRONG
char *copy = (char *)malloc(strlen(src)); // Forgot the +1 for '\0'

"I failed Exam 01 the first time. I got a 0 because my ft_strdup had an off-by-one. I went to the retake session three days later, practiced ft_split for 12 hours straight, and passed. That failure was the best lesson I ever had." – 42 Alumnus The C Piscine Exam 01 primarily tests your

10. ft_swap

  • ft_strdup: allocate + copy string with malloc.
  • ft_range: return int* array from min to max.
  • ft_ultimate_range: same but return size via pointer argument.
  • ft_strrev: in‑place string reversal.