Day 08
Day 08
Day 08
II Foreword 4
IV Exercise 01 : ft_boolean.h 6
V Exercise 02 : ft_abs.h 8
VI Exercise 03 : ft_point.h 9
1
Chapter I
Instructions
• Watch out! This document could potentially change up to an hour before submis-
sion.
• Make sure you have the appropriate permissions on your files and directories.
• On top of that, your exercises will be checked and graded by a program called
Moulinette.
• Moulinette is very meticulous and strict in its evaluation of your work. It is entirely
automated and there is no way to negotiate with it. So if you want to avoid bad
surprises, be as thorough as possible.
• Moulinette is not very open-minded. It won’t try and understand your code if it
doesn’t respect the Norm. Moulinette relies on a program called Norminator to
check if your files respect the norm. TL;DR: it would be idiotic to submit a piece
of work that doesn’t pass Norminator’s check.
• These exercises are carefully laid out by order of difficulty - from easiest to hardest.
We will not take into account a successfully completed harder exercise if an easier
one is not perfectly functional.
• Using a forbidden function is considered cheating. Cheaters get -42, and this grade
is non-negotiable.
2
C Bootcamp Day 08
• Moulinette compiles with these flags: -Wall -Wextra -Werror, and uses gcc.
• You cannot leave any additional file in your directory than those specified in the
subject.
• Got a question? Ask your peer on the right. Otherwise, try your peer on the left.
• Check out the "C Bootcamp" part of the forum on the intranet.
• Examine the examples thoroughly. They could very well call for details that are
not explicitly mentioned in the subject...
3
Chapter II
Foreword
optional :
4. If you have a great 7.1 sound system use the optical cable to connect it.
In some very specific cases, a 5.1 sound system will also be accepted.
4
Chapter III
Exercise 00 : ft.h
Exercise 00
ft.h
Turn-in directory : ex00/
Files to turn in : ft.h
Allowed functions : None
Notes : n/a
5
Chapter IV
Exercise 01 : ft_boolean.h
Exercise 01
ft_boolean.h
Turn-in directory : ex01/
Files to turn in : ft_boolean.h
Allowed functions : None
Notes : n/a
• Create a ft_boolean.h file. It’ll compile and run the following main appropriately
:
#include "ft_boolean.h"
6
C Bootcamp Day 08
• ou
I have an odd number of arguments.
7
Chapter V
Exercise 02 : ft_abs.h
Exercise 02
ft_abs.h
Turn-in directory : ex02/
Files to turn in : ft_abs.h
Allowed functions : None
Notes : n/a
#define ABS(Value)
8
Chapter VI
Exercise 03 : ft_point.h
Exercise 03
ft_point.h
Turn-in directory : ex03/
Files to turn in : ft_point.h
Allowed functions : None
Notes : n/a
#include "ft_point.h"
int main(void)
{
t_point point;
set_point(&point);
return (0);
}
9
Chapter VII
Exercise 04 : ft_param_to_tab
Exercise 04
ft_param_to_tab
Turn-in directory : ex04/
Files to turn in : ft_param_to_tab.c, ft_stock_par.h
Allowed functions : ft_split_whitespaces, ft_show_tab, malloc
Notes : n/a
• Create a function that stores the program’s arguments within an array structure
and that returns the address of that array’s first box.
• The structure array should be allocated and its last box shall contain 0 in its str
element to point out the end of the array.
10
C Bootcamp Day 08
• We’ll test your function with our ft_split_whitespaces and our ft_show_tab
(next exercise). Take the appropriate measures for this to work !
11
Chapter VIII
Exercise 05 : ft_show_tab
Exercise 05
ft_show_tab
Turn-in directory : ex05/
Files to turn in : ft_show_tab.c, ft_stock_par.h
Allowed functions : ft_putchar
Notes : n/a
• Create a function that displays the content of the array created by the previous
function.
◦ the argument
◦ the size
12
C Bootcamp Day 08
• We’ll test your function with our ft_param_to_tab (previous exercise). Take the
appropriate measures for this to work !
13