From 14914f50c3de6c5444e13cf67db064b03c1c90ef Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 16 Jul 2019 12:58:13 +0200 Subject: c09 passed, c10 start, exam00 and exam01 --- exam01/subjects/4-0-ft_range/subject.en.txt | 19 +++++++++++++++++++ exam01/subjects/4-0-ft_range/subject.fr.txt | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 exam01/subjects/4-0-ft_range/subject.en.txt create mode 100644 exam01/subjects/4-0-ft_range/subject.fr.txt (limited to 'exam01/subjects/4-0-ft_range') diff --git a/exam01/subjects/4-0-ft_range/subject.en.txt b/exam01/subjects/4-0-ft_range/subject.en.txt new file mode 100644 index 0000000..66a77a2 --- /dev/null +++ b/exam01/subjects/4-0-ft_range/subject.en.txt @@ -0,0 +1,19 @@ +Assignment name : ft_range +Expected files : ft_range.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Write the following function: + +int *ft_range(int start, int end); + +It must allocate (with malloc()) an array of integers, fill it with consecutive +values that begin at start and end at end (Including start and end !), then +return a pointer to the first value of the array. + +Examples: + +- With (1, 3) you will return an array containing 1, 2 and 3. +- With (-1, 2) you will return an array containing -1, 0, 1 and 2. +- With (0, 0) you will return an array containing 0. +- With (0, -3) you will return an array containing 0, -1, -2 and -3. diff --git a/exam01/subjects/4-0-ft_range/subject.fr.txt b/exam01/subjects/4-0-ft_range/subject.fr.txt new file mode 100644 index 0000000..9e848b3 --- /dev/null +++ b/exam01/subjects/4-0-ft_range/subject.fr.txt @@ -0,0 +1,19 @@ +Assignment name : ft_range +Expected files : ft_range.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Écrire la fonction suivante : + +int *ft_range(int start, int end); + +Cette fonction doit allouer avec malloc() un tableau d'ints, le remplir avec +les valeurs (consécutives) démarrant à start et finissant à end (start et end +inclus !), et renvoyer un pointeur vers la première valeur du tableau. + +Exemples: + +- Avec (1, 3) vous devrez renvoyer un tableau contenant 1, 2 et 3. +- Avec (-1, 2) vous devrez renvoyer un tableau contenant -1, 0, 1 et 2. +- Avec (0, 0) vous devrez renvoyer un tableau contenant 0. +- Avec (0, -3) vous devrez renvoyer un tableau contenant 0, -1, -2 et -3. -- cgit