42 Exam 00 [2021]

ft_swap Prototype: void ft_swap(int *a, int *b); Allowed functions: write (only if needed, but often none). Goal: swap values of two integers using pointers.

Even if your code prints the right answer, if you leak memory (for functions that use malloc ), you fail. You must master free() . 42 exam 00

: Implementing while loops to count or iterate through characters. ft_swap Prototype: void ft_swap(int *a, int *b); Allowed

This function takes an integer as a parameter and prints 'N' if the integer is negative, and 'P' if it is positive or zero. This tests basic conditional logic. You must master free()

You will face errors. You will face the Norminette rejecting your code because you have a blank line at the end of the file (Error: "Trailing whitespace"). You will face the frustration of a segmentation fault at minute 3:55.

at 42 (the first exam of the Piscine), you are typically tested on the fundamentals of the C language