diff options
Diffstat (limited to 'exam01')
35 files changed, 1676 insertions, 0 deletions
diff --git a/exam01/rendu/__GIT_HISTORY b/exam01/rendu/__GIT_HISTORY new file mode 100755 index 0000000..07c2777 --- /dev/null +++ b/exam01/rendu/__GIT_HISTORY @@ -0,0 +1,71 @@ +commit 45e8e511bd3d91e4cc7d44cef1257914d442541c +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 19:28:29 2019 +0200 + + ft_split + + ft_split/ft_split.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 72 insertions(+) + +commit 3f66b01dadeabbfb7332ca8eaff6c651baa7d60c +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 18:33:39 2019 +0200 + + overme + + ft_range/ft_range.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 2fa3ca5efbeea644b056cbaa24c006cb475f1d68 +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 18:22:27 2019 +0200 + + ft_range + + ft_range/ft_range.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +commit b9247efc1f78a0f27a5e8cb097a6d09316541982 +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 17:58:16 2019 +0200 + + k you dumb fuck + + wdmatch/wdmatch.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 79c5bf10efda0eead115b274dac91ad92587a53d +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 17:55:47 2019 +0200 + + wdmatch + + wdmatch/wdmatch.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 55 insertions(+) + +commit 39cdf357b40ced49f3ac6290d932c7801816115d +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 17:22:53 2019 +0200 + + rotone + + rotone/rotone.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +commit c265e4850d0962b936392aca4f3fd6668bd213b2 +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 17:11:27 2019 +0200 + + rev_print + + rev_print/rev_print.c | 32 ++++++++++++++++++++++++++++++++ + 1 file changed, 32 insertions(+) + +commit 9addd4166252d59255a58e3c6c1c7a1e926b37d3 +Author: Exam 42 <exam-no-reply@42.fr> +Date: Fri Jul 12 17:04:19 2019 +0200 + + hello + + hello/hello.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) diff --git a/exam01/rendu/ft_range/ft_range.c b/exam01/rendu/ft_range/ft_range.c new file mode 100755 index 0000000..de8c414 --- /dev/null +++ b/exam01/rendu/ft_range/ft_range.c @@ -0,0 +1,40 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_range.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 18:00:18 by exam #+# #+# */ +/* Updated: 2019/07/12 18:32:44 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <stdlib.h> + +int *ft_range(int start, int end) +{ + int *range; + int i; + + range = (int*)malloc(sizeof(int) * + (end - start < 0 ? start - end : end - start + 1)); + if (range == NULL) + return (NULL); + i = 0; + if (start < end) + while (start <= end) + { + range[i] = start; + start++; + i++; + } + else + while (start >= end) + { + range[i] = start; + start--; + i++; + } + return (range); +} diff --git a/exam01/rendu/ft_split/ft_split.c b/exam01/rendu/ft_split/ft_split.c new file mode 100755 index 0000000..7c8e5c7 --- /dev/null +++ b/exam01/rendu/ft_split/ft_split.c @@ -0,0 +1,72 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_split.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 18:35:38 by exam #+# #+# */ +/* Updated: 2019/07/12 19:27:00 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <stdlib.h> + +#define ISSEP(c) (c == ' ' || c == '\n' || c == '\t') + +int count_segment(char *str) +{ + int counter; + + counter = 0; + while (*str) + { + if (!ISSEP(*str)) + { + counter++; + while (*str && !ISSEP(*str)) + str++; + if (!*str) + break; + } + str++; + } + return (counter); +} + +char **ft_split(char *str) +{ + char **split; + char *tmp; + int i; + int j; + int segments; + + segments = count_segment(str); + split = (char**)malloc(sizeof(char*) * segments + 1); + if (split == NULL) + return (NULL); + j = 0; + while (j < segments) + { + if (ISSEP(*str)) + { + str++; + continue; + } + i = 0; + while (!ISSEP(str[i])) + i++; + tmp = (char*)malloc(sizeof(char) * i + 1); + if (tmp == NULL) + return (NULL); + i = 0; + while (!ISSEP(*str)) + tmp[i++] = *str++; + tmp[i] = '\0'; + split[j] = tmp; + j++; + } + split[j] = NULL; + return (split); +} diff --git a/exam01/rendu/hello/hello.c b/exam01/rendu/hello/hello.c new file mode 100755 index 0000000..0becc7e --- /dev/null +++ b/exam01/rendu/hello/hello.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* hello.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:01:31 by exam #+# #+# */ +/* Updated: 2019/07/12 17:03:00 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <unistd.h> + +int main(void) +{ + write(1, "Hello World!\n", 13); +} diff --git a/exam01/rendu/rev_print/rev_print.c b/exam01/rendu/rev_print/rev_print.c new file mode 100755 index 0000000..b46a2d6 --- /dev/null +++ b/exam01/rendu/rev_print/rev_print.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* rev_print.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:06:11 by exam #+# #+# */ +/* Updated: 2019/07/12 17:10:21 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <unistd.h> + +int main(int argc, char **argv) +{ + int i; + + if (argc == 1 || argc > 2) + { + write(1, "\n", 1); + return (0); + } + + i = 0; + while (argv[1][i]) + i++; + while (i-- > 0) + write(1, &argv[1][i], 1); + write(1, "\n", 1); + return (0); +} diff --git a/exam01/rendu/rotone/rotone.c b/exam01/rendu/rotone/rotone.c new file mode 100755 index 0000000..55a6ef5 --- /dev/null +++ b/exam01/rendu/rotone/rotone.c @@ -0,0 +1,39 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* rotone.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:12:59 by exam #+# #+# */ +/* Updated: 2019/07/12 17:21:12 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <unistd.h> + +void ft_putchar(char c) +{ + write(1, &c, 1); +} + +int main(int argc, char **argv) +{ + if (argc == 1 || argc > 2) + { + write(1, "\n", 1); + return (0); + } + while (*argv[1]) + { + if (*argv[1] >= 'a' && *argv[1] <= 'z') + ft_putchar(*argv[1] == 'z' ? 'a' : *argv[1] + 1); + else if (*argv[1] >= 'A' && *argv[1] <= 'Z') + ft_putchar(*argv[1] == 'Z' ? 'A' : *argv[1] + 1); + else + ft_putchar(*argv[1]); + argv[1]++; + } + write(1, "\n", 1); + return (0); +} diff --git a/exam01/rendu/wdmatch/wdmatch.c b/exam01/rendu/wdmatch/wdmatch.c new file mode 100755 index 0000000..96242c9 --- /dev/null +++ b/exam01/rendu/wdmatch/wdmatch.c @@ -0,0 +1,54 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* wdmatch.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: exam <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/12 17:25:25 by exam #+# #+# */ +/* Updated: 2019/07/12 17:57:14 by exam ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include <unistd.h> + +int in_charset(char c, char *charset) +{ + while (*charset) + if (c == *charset++) + return (1); + return (0); +} + +int main(int argc, char **argv) +{ + int i; + int j; + char *str; + char *charset; + + if (argc != 3) + { + write(1, "\n", 1); + return (0); + } + str = argv[1]; + charset = argv[2]; + i = 0; + j = 0; + while (str[i]) + { + if (!in_charset(str[i], charset)) + { + write(1, "\n", 1); + return (0); + } + while (*charset != str[i]) + charset++; + i++; + } + while (*str) + write(1, str++, 1); + write(1, "\n", 1); + return (0); +} diff --git a/exam01/subjects/0-0-hello/examples.txt b/exam01/subjects/0-0-hello/examples.txt new file mode 100644 index 0000000..4ac95f1 --- /dev/null +++ b/exam01/subjects/0-0-hello/examples.txt @@ -0,0 +1,5 @@ +$>./hello +Hello World! +$>./hello | cat -e +Hello World!$ +$> diff --git a/exam01/subjects/0-0-hello/subject.en.txt b/exam01/subjects/0-0-hello/subject.en.txt new file mode 100644 index 0000000..9dcbeaf --- /dev/null +++ b/exam01/subjects/0-0-hello/subject.en.txt @@ -0,0 +1,14 @@ +Assignment name : hello +Expected files : hello.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that displays "Hello World!" followed by a \n. + +Example: + +$>./hello +Hello World! +$>./hello | cat -e +Hello World!$ +$> diff --git a/exam01/subjects/0-0-hello/subject.fr.txt b/exam01/subjects/0-0-hello/subject.fr.txt new file mode 100644 index 0000000..9b4e158 --- /dev/null +++ b/exam01/subjects/0-0-hello/subject.fr.txt @@ -0,0 +1,14 @@ +Assignment name : hello +Expected files : hello.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui affiche "Hello World!" suivi d'un \n. + +Exemple: + +$>./hello +Hello World! +$>./hello | cat -e +Hello World!$ +$> diff --git a/exam01/subjects/1-0-rev_print/subject.en.txt b/exam01/subjects/1-0-rev_print/subject.en.txt new file mode 100644 index 0000000..7898a0d --- /dev/null +++ b/exam01/subjects/1-0-rev_print/subject.en.txt @@ -0,0 +1,18 @@ +Assignment name : rev_print +Expected files : rev_print.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes a string, and displays the string in reverse +followed by a newline. + +If the number of parameters is not 1, the program displays a newline. + +Examples: + +$> ./rev_print "rainbow dash" | cat -e +hsad wobniar$ +$> ./rev_print "Ponies are awesome" | cat -e +emosewa era seinoP$ +$> ./rev_print | cat -e +$ diff --git a/exam01/subjects/1-0-rev_print/subject.fr.txt b/exam01/subjects/1-0-rev_print/subject.fr.txt new file mode 100644 index 0000000..4af7395 --- /dev/null +++ b/exam01/subjects/1-0-rev_print/subject.fr.txt @@ -0,0 +1,18 @@ +Assignment name : rev_print +Expected files : rev_print.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui prend une chaîne et l'affiche en ordre inverse suivie +d'un newline. + +Si le nombre d'arguments n'est pas 1, le programme affiche un newline. + +Exemples: + +$> ./rev_print "zaz" | cat -e +zaz$ +$> ./rev_print "dub0 a POIL" | cat -e +LIOP a 0bud$ +$> ./rev_print | cat -e +$ diff --git a/exam01/subjects/2-0-rotone/examples.txt b/exam01/subjects/2-0-rotone/examples.txt new file mode 100644 index 0000000..b8db87f --- /dev/null +++ b/exam01/subjects/2-0-rotone/examples.txt @@ -0,0 +1,12 @@ +$>./rotone "abc" +bcd +$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e +Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$ +$>./rotone "AkjhZ zLKIJz , 23y " | cat -e +BlkiA aMLJKa , 23z $ +$>./rotone | cat -e +$ +$> +$>./rotone "" | cat -e +$ +$> diff --git a/exam01/subjects/2-0-rotone/subject.en.txt b/exam01/subjects/2-0-rotone/subject.en.txt new file mode 100644 index 0000000..093fc7a --- /dev/null +++ b/exam01/subjects/2-0-rotone/subject.en.txt @@ -0,0 +1,28 @@ +Assignment name : rotone +Expected files : rotone.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes a string and displays it, replacing each of its +letters by the next one in alphabetical order. + +'z' becomes 'a' and 'Z' becomes 'A'. Case remains unaffected. + +The output will be followed by a \n. + +If the number of arguments is not 1, the program displays \n. + +Example: + +$>./rotone "abc" +bcd +$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e +Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$ +$>./rotone "AkjhZ zLKIJz , 23y " | cat -e +BlkiA aMLJKa , 23z $ +$>./rotone | cat -e +$ +$> +$>./rotone "" | cat -e +$ +$> diff --git a/exam01/subjects/2-0-rotone/subject.fr.txt b/exam01/subjects/2-0-rotone/subject.fr.txt new file mode 100644 index 0000000..07e5004 --- /dev/null +++ b/exam01/subjects/2-0-rotone/subject.fr.txt @@ -0,0 +1,31 @@ +Assignment name : rotone +Expected files : rotone.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme nommé rotone, qui prend en paramètre une chaîne de +caractères, et qui affiche cette chaîne en remplaçant chaque caractère +alphabétique par le caractère suivant dans l'ordre alphabétique. + +'z' devient 'a' et 'Z' devient 'A'. Les majuscules restent des majuscules, les +minuscules restent des minuscules. + +L'affichage se termine toujours par un retour à la ligne. + +Si le nombre de paramètres transmis est différent de 1, le programme affiche +'\n'. + +Exemple: + +$>./rotone "abc" +bcd +$>./rotone "Les stagiaires du staff ne sentent pas toujours tres bon." | cat -e +Mft tubhjbjsft ev tubgg of tfoufou qbt upvkpvst usft cpo.$ +$>./rotone "AkjhZ zLKIJz , 23y " | cat -e +BlkiA aMLJKa , 23z $ +$>./rotone | cat -e +$ +$> +$>./rotone "" | cat -e +$ +$> diff --git a/exam01/subjects/3-0-wdmatch/examples.txt b/exam01/subjects/3-0-wdmatch/examples.txt new file mode 100644 index 0000000..cf0c96a --- /dev/null +++ b/exam01/subjects/3-0-wdmatch/examples.txt @@ -0,0 +1,10 @@ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e +quarante deux$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-0-wdmatch/subject.en.txt b/exam01/subjects/3-0-wdmatch/subject.en.txt new file mode 100644 index 0000000..a8e058d --- /dev/null +++ b/exam01/subjects/3-0-wdmatch/subject.en.txt @@ -0,0 +1,26 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes two strings and checks whether it's possible to +write the first string with characters from the second string, while respecting +the order in which these characters appear in the second string. + +If it's possible, the program displays the string, followed by a \n, otherwise +it simply displays a \n. + +If the number of arguments is not 2, the program displays a \n. + +Examples: + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-0-wdmatch/subject.fr.txt b/exam01/subjects/3-0-wdmatch/subject.fr.txt new file mode 100644 index 0000000..383fe15 --- /dev/null +++ b/exam01/subjects/3-0-wdmatch/subject.fr.txt @@ -0,0 +1,28 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Le programme prend en paramètres deux chaînes de caractères et vérifie qu'il +est possible d'écrire la première chaîne de caractères a l'aide des caractères +de la deuxiême chaîne, tout en respectant l'ordre des caractères dans la +deuxième chaîne. + +Si cela est possible, le programme affiche la première chaîne de caractères, +suivie de '\n'. Sinon le programme affiche seulement '\n'. + +Si le nombre de paramètres transmis est différent de 2, le programme affiche +'\n'. + +Exemples : + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$
\ No newline at end of file diff --git a/exam01/subjects/3-1-wdmatch/examples.txt b/exam01/subjects/3-1-wdmatch/examples.txt new file mode 100644 index 0000000..cf0c96a --- /dev/null +++ b/exam01/subjects/3-1-wdmatch/examples.txt @@ -0,0 +1,10 @@ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e +quarante deux$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-1-wdmatch/subject.en.txt b/exam01/subjects/3-1-wdmatch/subject.en.txt new file mode 100644 index 0000000..a8e058d --- /dev/null +++ b/exam01/subjects/3-1-wdmatch/subject.en.txt @@ -0,0 +1,26 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes two strings and checks whether it's possible to +write the first string with characters from the second string, while respecting +the order in which these characters appear in the second string. + +If it's possible, the program displays the string, followed by a \n, otherwise +it simply displays a \n. + +If the number of arguments is not 2, the program displays a \n. + +Examples: + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$ diff --git a/exam01/subjects/3-1-wdmatch/subject.fr.txt b/exam01/subjects/3-1-wdmatch/subject.fr.txt new file mode 100644 index 0000000..383fe15 --- /dev/null +++ b/exam01/subjects/3-1-wdmatch/subject.fr.txt @@ -0,0 +1,28 @@ +Assignment name : wdmatch +Expected files : wdmatch.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Le programme prend en paramètres deux chaînes de caractères et vérifie qu'il +est possible d'écrire la première chaîne de caractères a l'aide des caractères +de la deuxiême chaîne, tout en respectant l'ordre des caractères dans la +deuxième chaîne. + +Si cela est possible, le programme affiche la première chaîne de caractères, +suivie de '\n'. Sinon le programme affiche seulement '\n'. + +Si le nombre de paramètres transmis est différent de 2, le programme affiche +'\n'. + +Exemples : + +$>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e +faya$ +$>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e +$ +$>./wdmatch "forty two" "qfqfsoudf arzgrsayns tsryegftdgs sjytwdekuooixq " | cat -e +forty two$ +$>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e +$ +$>./wdmatch | cat -e +$
\ No newline at end of file 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. diff --git a/exam01/subjects/4-1-ft_range/subject.en.txt b/exam01/subjects/4-1-ft_range/subject.en.txt new file mode 100644 index 0000000..66a77a2 --- /dev/null +++ b/exam01/subjects/4-1-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-1-ft_range/subject.fr.txt b/exam01/subjects/4-1-ft_range/subject.fr.txt new file mode 100644 index 0000000..9e848b3 --- /dev/null +++ b/exam01/subjects/4-1-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. diff --git a/exam01/subjects/5-0-ft_split/subject.en.txt b/exam01/subjects/5-0-ft_split/subject.en.txt new file mode 100644 index 0000000..97375e9 --- /dev/null +++ b/exam01/subjects/5-0-ft_split/subject.en.txt @@ -0,0 +1,14 @@ +Assignment name : ft_split +Expected files : ft_split.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Write a function that takes a string, splits it into words, and returns them as +a NULL-terminated array of strings. + +A "word" is defined as a part of a string delimited either by spaces/tabs/new +lines, or by the start/end of the string. + +Your function must be declared as follows: + +char **ft_split(char *str); diff --git a/exam01/subjects/5-0-ft_split/subject.fr.txt b/exam01/subjects/5-0-ft_split/subject.fr.txt new file mode 100644 index 0000000..acd1b41 --- /dev/null +++ b/exam01/subjects/5-0-ft_split/subject.fr.txt @@ -0,0 +1,16 @@ +Assignment name : ft_split +Expected files : ft_split.c +Allowed functions: malloc +-------------------------------------------------------------------------------- + +Écrire une fonction qui prend en paramètre une chaîne de caractères et la +découpe en mots, qui seront retournés sous la forme d'un tableau de chaînes +terminé par NULL. + +On appelle "mot" une portion de chaîne de caractères délimitée soit par des +espaces, des retours à la ligne et/ou des tabulations, soit par le début / fin +de la chaîne. + +Votre fonction devra être prototypée de la façon suivante : + +char **ft_split(char *str); diff --git a/exam01/traces/0-0-hello.trace.txt b/exam01/traces/0-0-hello.trace.txt new file mode 100644 index 0000000..6708b57 --- /dev/null +++ b/exam01/traces/0-0-hello.trace.txt @@ -0,0 +1,47 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r1-p2.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:05:17 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmpHW3uXn/user log --pretty='%H - %an, %ad : %s' +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmpHW3uXn/user +total 8 +-rw-r--r-- 1 deepthought deepthought 210 Jul 12 17:05 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:05 hello + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmpHW3uXn/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:05 hello.c + += hello ======================================================================== +$> gcc -Wextra -Wall -Werror hello.c -o user_exe + += Test 1 =================================================== +$> ./swu3bvaw8nu1f56oykt470ve test1.prm +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/1-0-rev_print.trace.txt b/exam01/traces/1-0-rev_print.trace.txt new file mode 100644 index 0000000..c9212d6 --- /dev/null +++ b/exam01/traces/1-0-rev_print.trace.txt @@ -0,0 +1,103 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r2-p4.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:12:08 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user log --pretty='%H - %an, %ad : %s' +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user +total 8 +-rw-r--r-- 1 deepthought deepthought 447 Jul 12 17:12 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:12 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:12 rev_print + +/var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:12 hello.c + +/var/folders/49/vw2c6pv17yq6vvhq5n0c_9400000gq/T/tmppeTD9_/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:12 rev_print.c + += rev_print ==================================================================== +$> gcc -Wextra -Wall -Werror rev_print.c -o user_exe + += Test 1 =================================================== +$> ./qp1cxso9hvmxofxjwbrbtvw4 +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./gjibjpt1qoil06muy87ewdrx "bU4ktETLK1My9u" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./5zqb19ur5317h4rx0gxwti18 "kxYCfVjHreaSiBKp0" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./sz55vjsqvgvqokxrvnvuf2yx "MuOS0w1vEPDyJoH" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./77k6m1s1joa651w6qods8p84 "X41Pf7FCa2ISZ alQ5jBtAm atob4mgfBenYOFSw 6O4xBlmCPoAfzt gYfc81ymiOQrMAuUJ" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./i3kqwfb8cs4ustspao4u0xsv "wbMyK9ck Jvir 3EVKp JGNkq qn5fDiLmd9KvQN kTrPsKia fWMNy1DFgm2dUK GDOcYsj2gQ3I49 S2sWCDc5YfbERngL" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./mt240kr9fje92d3sceymn1xh "7lZxPYHshQw 6EzZGqJojWlfVvMr1 svcq170ESUMuD JA9Ugls341bBv bXW 9pQwY NFRPx fPiQ3d unChBiMLRGYK VHyA0ulq5gEe6pIh duZsRC Bsl0MIG6vwJL CjchIOUGJm" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./iydwvdaeetokh323ft2bholm "Vs826SBY0T9" "REkbsFTtOw" "zUouOkQvtZE" "R2nOiJcNjkPrFE" "mvgaQsd1HAC2EuB" "jkrqu8nzUa" "pe9Koul6FEvhX" "LFkaBOoVXn9Sd" "gF9SGuJwB8Z" "LEi" "LtPBlSnZjXsR" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./jgb9gq5ioyi72pjqj6zpkguh "k3QoDP2m5Ih7Ftr" "HcyhAi" "tbuWkUpH" "VEyg3MAduwZeG8" "1o5wMxTcn2" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./qlkcoodi721p27el6yryjnqx "ql9k QLA6Grj9pND35Mni PSWcy2 hsSzplIZWdxjNemK 6CrsOLbGv1 pa9dA1Mx8BEb dOpkBMRP7 pmtZ vhmezF0Rk WOMqkDeQl3ouIUw7 CRo9J4lEw6Lg3r wx0lPTIKcv9dU" "HnDVvFhAWq 4BYigusbQonc7fxV boIKUFYBpQa NZIYygcSVC5mxHGuA Ep7nfMPN apcuB rkuUqSnZQlIa7 0hQ rv4ixO9TYK 0aYextFX" "wWJ2bUDudgHpfEs6K 8nJsbfpvr04HEwNM UGwDtYAXc hc03 Wg3mq9KYGphe4t iO2gXlF lS4Ohw jYA59Lv2oGTOufQPB ZpmurSBjiAJHIwXVE Fb9LfqzeHkYE21c Cbn5 S7cN0 I6v7ko VLPoyBGjb HxFflpJRk5aO3Ig C2JExK0a84cn6 XZrMbLT E4WRLqCS5" "j5SdkQOs9urf 6I0adOVe MoN4y6n 1GZvHxq7bCAfKcD 6gzwtK Ia6qX4 tTGExkyqe7z qsY1V8G4 vASbdw RZqlPJB BNu5pO79r oj8Sph25v dGRZcT58e C67int" "sCu rAspIohz9Rmd6waf oGaFT EHxQ4wFk Bogv3Nz mEbwhun9slY7N4Cvt e78Dt 3x6gE M6QV EWP2b 32kD tYeJZSMC fpz24v TWcx1" "LH6gWZtoEBm jn9 kHm7 Eoem eZp hrjOTiaNgnd68UDmS RFKcion3JIheOHGd 2qAdGtic iHMdryEBZVOU 8qQNajv2AnU oGK" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./9upevvmsesg1wj241ujrur1v "VoUHTMPEGQ7f2tS Ri7VXDwbC6TYSu21s CAB1PmX7FMtOUckj 45YsDerNfv tfx1zDe3YP o5Xw GFmEecLTv9qC4VDh ijVJX8 HWNJM z9q8oJ 5jZuG U9ELsgoaHS3In Seq3K6m xV8 d2HfUSb" "t02fbz R7w2tBfQCgpksmF89 pBK 6lXNnCQ9 vqXWLaKyzCZ3bh5s AYQeUtpsRMcBl6q SrQw1 rVgkfTvdJl AHE0clZy WJjSty20KdNbcFru QN4qJMvhd3s0o OjvqzP0wB9MJ3NA68 hJ5l3RqtPT1mH 3V48St10ag udZUKG6vY0ea7CDLc" "em61Jg7UN KyGdkE8bB1T KLH HIsmKBiqpT 3dmPeGgtv gpdatls ce2ah R63l Eljkd6XgruWRZ Z3qo6IzYKrh0GJwMO aBtUemER O9KnLdAqjIXcGMTJN yAZxY 2m93QVp7Y4MFS gQrVx47E6WlT" "6XCuv0JldqNoxYOZs KwQmEzWgMX1 Uq0k8SX EqpOAgZIJz 1jc9BN5s7azo6 MPOnDqEH gtS 5cHisDm" "XipOD7mfWaxK 16fSmQyeLKCUZF V9j8Fp6Ix2RztOhq x2hCNXuVyQoPw Y5eG1nDPRo7LyFf 9y0 G7z bkZtVgarLzFAfjP6M MK3YmEqCy2 D2f3t OxUzm2dPKc5" "Uey0DfZzkh8Cl 15JY VI0E 5jTkwe9I8L40 P4msUMwx VkXt7vZqsLyfawWK FUQfToHz6wlVc8s1n yr3VL ucRE2sGm5DjiYOgNr vJHSGkC9 JTz6uPNt2ahrQsdF ehq1dD Pm3q4B" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/2-0-rotone.trace.txt b/exam01/traces/2-0-rotone.trace.txt new file mode 100644 index 0000000..313b569 --- /dev/null +++ b/exam01/traces/2-0-rotone.trace.txt @@ -0,0 +1,154 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r2-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:23:20 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user log --pretty='%H - %an, %ad : %s' +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user +total 8 +-rw-r--r-- 1 deepthought deepthought 682 Jul 12 17:23 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:23 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:23 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:23 rotone + +/var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:23 hello.c + +/var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:23 rev_print.c + +/var/folders/3k/gr3dft714z98xqm6sbdzsb940000gq/T/tmpigNU3o/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 17:23 rotone.c + += rotone ======================================================================= +$> gcc -Wextra -Wall -Werror rotone.c -o user_exe + += Test 1 =================================================== +$> ./5p2v1eij0gkpe58u5j1xc61v +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./t5h70kjtjnz320gn3acua3iy +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./6l5samsigyoctvkzg19vnotm "salut" "a" "tous" "tout" "le" "monde" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./ul8gcbbvq0epa14hkn5klqp7 "gKJdrWc" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./wa7m13u46s6u9i75esgqff3t "3bjR8uUYtWdEqGr" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./evh5cg5bbs2hx17tn74iw11k "cpKELqwb" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./crudn5sd96ial62bvofy0sxj "QlUCGD3FiOXsf vEO 7ydB CYH0TOZgJcve8w" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./7fsn6hc4owe6yyrvxfhi2bct "54oVvONYrUw Oz8xi3Sk w4BWXosIpvANOU8u cWzQl79jV PsE5b bOlrutJGxZ Ex2BpNwC" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./l83z7exbivdhpxdwebhw4bww "3EV58cJkxoePb bWjoM3 oXsv VMt wjae0gsQV fekI lYvtOcb1j8sTr0 IaPsBU FOaVyX6 lCXIc qm1fp p7TuLPWev3I IdJgCiX6AFp vY4 krwXELltguWS65 i7B3Gx0rX YSmf1Tx" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./9soy6rbmf7ez6udbcv4xzulz ")LNUg5t4Jyn5KLAwsXT1gajN932 =" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./snz9zhto1blihahtzay1lbzl "0vuwp2)yAS ;" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./lwd4d6lw1re2uaqieo2mlk04 "1HLqhljdXr41 /H0xzSDEni5Zcu,aWop4bzjORT7uItP;rOTEH9w6qo@tVwEsfMn?PFa0v6DORz3dTEe6myVIRtvqiQuW3fz5:PYgRCySlWHLc5iBJ1" +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./qxr0xvlzfd7600tj1t2rytr8 "/Mmr1Q7UTqRmCNbcnJ:kDJuB2MeAbm71 ;UY1s42XhuaZ3F9krj fElQNHLCrh2M9FjJ/Qk4B7SqmV9r6" +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./07f5ev38zqoitr0k1id0aoko "3Tiw (" +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./7v9i3lvbarnrc94xq6c57u9f ".gwMtPpORxy<K6vxW ?gH5nyzYKkpZtbhB,J7n4cZUj2CEFp>zED7uG4AdxnYFTkp FrBvim52xf/W2PxGYMj0 DufzGReEbnqBPdm:PGs3 ?jFA1O9rmEWRevoG?" +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./qnbx0s1lt8jhbdxsox60yonu " HhOL RbElYXIm6 @qcmFgPsHDRrCT4" +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./jot2ckxacbzccdegeq3fgwnd " 5IYiwL<zjCYWN0GKUHncv0zjQ5ZFmYr8EuH3Byht7Q8zP2ydxAo7kiH?B7iUeJhjt8M6vb ZsW1OkcQ2fJ9d4Ll1p5Lh9HiuBY36Ok7wU /5uW>Z2yEJdovwCLhk " +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./o1l96w0t5uj234saf6izownp " 4VrRgmLEvHyJnZ 5Ha3uVM=eX9MOgBsYxwov3kSh04qfPQ1TRFd?" +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./lhpopm7d6r7mowhgsnyidsr3 ",OdqFXiYfIhZnMB>Ixr1uaVJlmvf3eyY 1gCRk0bDZ6eh)c1BFzDUdHJp -" +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./48l65bjipgn86o4dfgjt3k9p "8uUlX7CHiJBrsV4mp,uSJFrN25DWhb9Y6.YarDR(DgftRvSal1qsPmbk1kQhWNSU7jqgsuJ )2UI5l0pRiXqoM 4mhTR1goq3x2f4Ons >" +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/3-0-wdmatch.trace.txt b/exam01/traces/3-0-wdmatch.trace.txt new file mode 100644 index 0000000..e1d3ab6 --- /dev/null +++ b/exam01/traces/3-0-wdmatch.trace.txt @@ -0,0 +1,65 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r1-p2.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:56:18 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user log --pretty='%H - %an, %ad : %s' +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user +total 8 +-rw-r--r-- 1 deepthought deepthought 936 Jul 12 17:56 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:56 wdmatch + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:56 hello.c + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:56 rev_print.c + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 17:56 rotone.c + +/var/folders/_m/wmzv2nsn7918t3fjlm5kpcp80000gq/T/tmppmgK3M/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1448 Jul 12 17:56 wdmatch.c + += wdmatch ====================================================================== +$> gcc -Wextra -Wall -Werror wdmatch.c -o user_exe +wdmatch.c:25:7: error: unused variable 'k' [-Werror,-Wunused-variable] + int k; + ^ +1 error generated. + +Could not compile 'user_exe' +Grade: 0 + += Final grade: 0 =============================================================== diff --git a/exam01/traces/3-1-wdmatch.trace.txt b/exam01/traces/3-1-wdmatch.trace.txt new file mode 100644 index 0000000..9743146 --- /dev/null +++ b/exam01/traces/3-1-wdmatch.trace.txt @@ -0,0 +1,161 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +w-r2-p5.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 17:59:24 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user log --pretty='%H - %an, %ad : %s' +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1159 Jul 12 17:59 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 17:59 wdmatch + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 17:59 hello.c + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 17:59 rev_print.c + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 17:59 rotone.c + +/var/folders/1q/yqwld_d96131dtk9b6jn59g80000gq/T/tmpbdmrqz/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 17:59 wdmatch.c + += wdmatch ====================================================================== +$> gcc -Wextra -Wall -Werror wdmatch.c -o user_exe + += Test 1 =================================================== +$> ./n9zviw9j3v4zn5ckd9eoyo8s +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./c6yzzsryz3arxspfwla7xalk "salut a tous tout le monde" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./qg9mddv7x21yn0rpttql3xpv "salut" "a" "tous" "tout" "le" "monde" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./3ypnkej5n8624wirdb6p47hu "llo" "helllo" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./vhzpjkvd3y7lr4qo57w520y8 "hj" "3hQxj" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./v1jn1lmkqga4f1lo6d6z9s5b "T0GLy" "tSPOIbFzmieBP" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./66wcc32oyhp5wolik9xhizda "eApPN" "K4EXjRIgMpvTfui5C9" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./2n1djla2zveq15agknjibehv "eUQVA" "JkguGhz9L57tCVEyus9xSHc1l6P" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./mlitjrnvk8uuyfaat0ce5zve "NYW6w" "egjZPO2LEfQ7YVD5QjuaxTs4yCg" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./z3arjyex46fups161cg8bpqq "lPVtY" "Ajk4FHUO5Zu8WD73n8omr4hd" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./n9n0adpmhw1ih9lx5umo0oy8 "wjqkN" "fiY8W2EjboAO5HgDI" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./znxhx77j9t81cyk3clxl2ifs "XE3Vp" "XQxEW3DnVjpzy" +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./fz0b7g6y6yyc12npc94am62v "Hylfr" "HVOylfSvrn9" +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./d334rpw01wa9tqblbr133fun "mjWgP" "CfFSQ2dDkJIE" +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./cmr7w33jvh3zgpfach4m48sr "bamH" "G0OXchivUTudp28Ax91V" +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./moaxsm61mtz09hnqlssc7z9d "TyaLR" "fd5SRHBb9lw5zUiskaG" +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./qintd2y92gek5sdblk2n0xd4 "bMva7" "brMDvjap7" +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./ku1atu25akqnrf4fg0i6b0oy "s3iEf" "3rznPk2KYIquf8gwvT9paPuVb" +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./j9g9z9l3kz62q72ez6yktn87 "9q" "9kAq" +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./6oj676fehbo3e4lje9ul1taj "RYcM" "xRj5YhdcM" +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/4-0-ft_range.trace.txt b/exam01/traces/4-0-ft_range.trace.txt new file mode 100644 index 0000000..7115c1b --- /dev/null +++ b/exam01/traces/4-0-ft_range.trace.txt @@ -0,0 +1,115 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r5-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 18:23:16 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user log --pretty='%H - %an, %ad : %s' +2fa3ca5efbeea644b056cbaa24c006cb475f1d68 - Exam 42, Fri Jul 12 18:22:27 2019 +0200 : ft_range +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1400 Jul 12 18:23 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 ft_range +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:23 wdmatch + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/ft_range: +total 8 +-rw-r--r-- 1 deepthought deepthought 1260 Jul 12 18:23 ft_range.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 18:23 hello.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 18:23 rev_print.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 18:23 rotone.c + +/var/folders/sc/3cr_430s4133psx3bxr8_b8c0000gq/T/tmpg1ic4T/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 18:23 wdmatch.c + += ft_range ===================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_range.c -o user_exe + += Test 1 =================================================== +$> ./g21mmeb3fnkmra613kplrje3 +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./ff12prfgdfgwwgiuazp32zoi "21" "2313" "12" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./4k2pgjm72ynpxvnp38nm1dxy "2147483647" "2147483640" "7" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./rw49m14fa6ups80bepjum2ly "-2147483648" "-2147483600" "48" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./o0sll2siyvd6r40hr7x02mou "0" "0" "1" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./14dqgxcnetdxy26xiwmjt0so "947524478" "947524491" "14" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./dakasgofurjtxi05ideufkg3 "1772357724" "1772357724" "1" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./qfjgzmefzhhguiaqrzj54r1v "-190719626" "-190719609" "18" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./ltc0ovkn3xduhtaljmm6vawv "413688041" "413688079" "39" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./c8gp9fhmubnej8hccywxfdl3 "366550988" "366550969" "20" +Command './c8gp9fhmubnej8hccywxfdl3 "366550988" "366550969" "20"' got killed by a Segmentation fault (Signal -11) +Grade: 0 + += Final grade: 0 =============================================================== diff --git a/exam01/traces/4-1-ft_range.trace.txt b/exam01/traces/4-1-ft_range.trace.txt new file mode 100644 index 0000000..fd85054 --- /dev/null +++ b/exam01/traces/4-1-ft_range.trace.txt @@ -0,0 +1,168 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r3-p1.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 18:34:21 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user log --pretty='%H - %an, %ad : %s' +3f66b01dadeabbfb7332ca8eaff6c651baa7d60c - Exam 42, Fri Jul 12 18:33:39 2019 +0200 : overme +2fa3ca5efbeea644b056cbaa24c006cb475f1d68 - Exam 42, Fri Jul 12 18:22:27 2019 +0200 : ft_range +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1623 Jul 12 18:34 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 ft_range +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 18:34 wdmatch + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/ft_range: +total 8 +-rw-r--r-- 1 deepthought deepthought 1297 Jul 12 18:34 ft_range.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 18:34 hello.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 18:34 rev_print.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 18:34 rotone.c + +/var/folders/rt/b_9tgc9x3tzgq6m2gzh8pf780000gq/T/tmpRJGHS2/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 18:34 wdmatch.c + += ft_range ===================================================================== +$> gcc -Wextra -Wall -Werror main.c ft_range.c -o user_exe + += Test 1 =================================================== +$> ./5gnhy9cl4wh3edale0etwron +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./mt913ajheprtwzaeleoeulzj "21" "2313" "12" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./pd3xjbxxqx6523c7gvknvm2k "2147483647" "2147483640" "7" +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./y5p808qu0ixv9jxw52de12ul "-2147483648" "-2147483600" "48" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./5gkxe87k5v1wn3uspajyr0ik "0" "0" "1" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./0at5ige22l7dcjjv6u3adinr "522550420" "522550435" "16" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./xzmzoyn30lgsw0f24wvefdp5 "318550871" "318550861" "11" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./hf5jk1jdtwmco53qcmwe13ok "86321634" "86321661" "28" +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./87ycspb992rbng8paclgxk21 "1374261865" "1374261844" "22" +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D += Test 10 ================================================== +$> ./luc8mpllyflufoo7hjmp06qo "571776829" "571776806" "24" +$> diff -U 3 user_output_test10 test10.output | cat -e + +Diff OK :D += Test 11 ================================================== +$> ./x3xt4ncgbhohjwxg2kpaypvj "1698674613" "1698674594" "20" +$> diff -U 3 user_output_test11 test11.output | cat -e + +Diff OK :D += Test 12 ================================================== +$> ./yburw73lnwpbkhizk9wolzjb "1965022154" "1965022126" "29" +$> diff -U 3 user_output_test12 test12.output | cat -e + +Diff OK :D += Test 13 ================================================== +$> ./dl4k13imbv4ajmtpgdbdf1ay "1772753417" "1772753447" "31" +$> diff -U 3 user_output_test13 test13.output | cat -e + +Diff OK :D += Test 14 ================================================== +$> ./ny8qmx0olpsrv7e52xiik9sy "479115808" "479115804" "5" +$> diff -U 3 user_output_test14 test14.output | cat -e + +Diff OK :D += Test 15 ================================================== +$> ./69hppukj6xoo8z8pk675wc84 "396942871" "396942823" "49" +$> diff -U 3 user_output_test15 test15.output | cat -e + +Diff OK :D += Test 16 ================================================== +$> ./e6idhi7ofk8r2301vp9qwof0 "74676945" "74676941" "5" +$> diff -U 3 user_output_test16 test16.output | cat -e + +Diff OK :D += Test 17 ================================================== +$> ./58ymfqqquqy21jy8gojjjxlr "1765998341" "1765998314" "28" +$> diff -U 3 user_output_test17 test17.output | cat -e + +Diff OK :D += Test 18 ================================================== +$> ./1y9td2e4s6wqounorz9ztxwi "1548556672" "1548556696" "25" +$> diff -U 3 user_output_test18 test18.output | cat -e + +Diff OK :D += Test 19 ================================================== +$> ./vxiw3frjqwrix4mr1ye8vbi9 "1736446061" "1736446048" "14" +$> diff -U 3 user_output_test19 test19.output | cat -e + +Diff OK :D += Test 20 ================================================== +$> ./d8w68dypib9yfcpnvpdd29ln "-171928845" "-171928865" "21" +$> diff -U 3 user_output_test20 test20.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== diff --git a/exam01/traces/5-0-ft_split.trace.txt b/exam01/traces/5-0-ft_split.trace.txt new file mode 100644 index 0000000..0032fa5 --- /dev/null +++ b/exam01/traces/5-0-ft_split.trace.txt @@ -0,0 +1,163 @@ += Host-specific information ==================================================== +$> hostname; uname -msr +e-r5-p7.s19.be +Darwin 16.7.0 x86_64 +$> date +Fri Jul 12 19:28:53 CEST 2019 +$> gcc --version +Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin +$> clang --version +Apple LLVM version 9.0.0 (clang-900.0.39.2) +Target: x86_64-apple-darwin16.7.0 +Thread model: posix +InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin + += User files collection ======================================================== +Collecting user files from Vogsphere +Repository URL: auto-exam/2019/c-piscine-exam-01/exam_20190712/cacharle + += Git history ================================================================== +$> git -C /var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user log --pretty='%H - %an, %ad : %s' +45e8e511bd3d91e4cc7d44cef1257914d442541c - Exam 42, Fri Jul 12 19:28:29 2019 +0200 : ft_split +3f66b01dadeabbfb7332ca8eaff6c651baa7d60c - Exam 42, Fri Jul 12 18:33:39 2019 +0200 : overme +2fa3ca5efbeea644b056cbaa24c006cb475f1d68 - Exam 42, Fri Jul 12 18:22:27 2019 +0200 : ft_range +b9247efc1f78a0f27a5e8cb097a6d09316541982 - Exam 42, Fri Jul 12 17:58:16 2019 +0200 : k you dumb fuck +79c5bf10efda0eead115b274dac91ad92587a53d - Exam 42, Fri Jul 12 17:55:47 2019 +0200 : wdmatch +39cdf357b40ced49f3ac6290d932c7801816115d - Exam 42, Fri Jul 12 17:22:53 2019 +0200 : rotone +c265e4850d0962b936392aca4f3fd6668bd213b2 - Exam 42, Fri Jul 12 17:11:27 2019 +0200 : rev_print +9addd4166252d59255a58e3c6c1c7a1e926b37d3 - Exam 42, Fri Jul 12 17:04:19 2019 +0200 : hello + += Collected files ========================================== +$> ls -lAR /var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user +total 8 +-rw-r--r-- 1 deepthought deepthought 1878 Jul 12 19:28 __GIT_HISTORY +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 ft_range +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 ft_split +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 hello +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 rev_print +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 rotone +drwxr-xr-x 3 deepthought deepthought 102 Jul 12 19:28 wdmatch + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/ft_range: +total 8 +-rw-r--r-- 1 deepthought deepthought 1297 Jul 12 19:28 ft_range.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/ft_split: +total 8 +-rw-r--r-- 1 deepthought deepthought 1745 Jul 12 19:28 ft_split.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/hello: +total 8 +-rw-r--r-- 1 deepthought deepthought 965 Jul 12 19:28 hello.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/rev_print: +total 8 +-rw-r--r-- 1 deepthought deepthought 1142 Jul 12 19:28 rev_print.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/rotone: +total 8 +-rw-r--r-- 1 deepthought deepthought 1363 Jul 12 19:28 rotone.c + +/var/folders/wd/3qxxh4192m5gjkbpmr7c13h00000gq/T/tmpsPp8k_/user/wdmatch: +total 8 +-rw-r--r-- 1 deepthought deepthought 1439 Jul 12 19:28 wdmatch.c + += ft_split ===================================================================== +$> gcc -Wextra -Wall -Werror ft_split.c main.c -o user_exe + += Test 1 =================================================== +$> ./a4vj6tsoef07wx4xuf6eqvha "" +$> diff -U 3 user_output_test1 test1.output | cat -e + +Diff OK :D += Test 2 =================================================== +$> ./xutol673u4gqzbgldd2pi5ke " + + +" +$> diff -U 3 user_output_test2 test2.output | cat -e + +Diff OK :D += Test 3 =================================================== +$> ./2i6xq0u09m0xypndu45oq8na " + " +$> diff -U 3 user_output_test3 test3.output | cat -e + +Diff OK :D += Test 4 =================================================== +$> ./jq7qzt2b8rkalfklwzmpnt9s "ieyn0wrT5akRqX" +$> diff -U 3 user_output_test4 test4.output | cat -e + +Diff OK :D += Test 5 =================================================== +$> ./mdi3gwilmko0h3f8ax42fr3i "PSmlftsD0" +$> diff -U 3 user_output_test5 test5.output | cat -e + +Diff OK :D += Test 6 =================================================== +$> ./4uycdib5rdg7g4c5fkwcvd93 " + +KOL0Skb8PEa62i +CvV + + On1cNJwhmR + rB2VK1Skv a3nGgp6xMeikkjvwtpQ1Xayiq + B0iq + KfbC wZ3x0jdlmT +emHAkzjwi6 YqheUTZsAo3" +$> diff -U 3 user_output_test6 test6.output | cat -e + +Diff OK :D += Test 7 =================================================== +$> ./lk7npxuxf5eld6gzs6hustfr "Vne42szF7EDLMPNY9kbBqQui ZwdNUtXAnVQiDg + +5PtgFuzyQ2SdqIWnx + pFSm7D1jzPhbXfes F7jlWU9tha1CSOcEtdie6Yn3 + +" +$> diff -U 3 user_output_test7 test7.output | cat -e + +Diff OK :D += Test 8 =================================================== +$> ./2wnp79s2d3m26reowmd2f5b2 " + + MWEf0DaoFi + +Sbjlga5 +5j1szveJwXIRHPo79 + + + +FAkapH7TzmDxInUr + + " +$> diff -U 3 user_output_test8 test8.output | cat -e + +Diff OK :D += Test 9 =================================================== +$> ./0baf8z595hkr5znegf1uxa8x " + +ypvHO53EKQL +qpBbg +EYrKyLFp7 + + KrS95jgv CN9ltq0j5GE + +0mvY4 + + bH6XSGYpiAKc + + qsTUa + 3ZLV1gMHafJ6tu tmEvYksZ0 IRABxmTVX5qZk +Y01Oc + " +$> diff -U 3 user_output_test9 test9.output | cat -e + +Diff OK :D +Grade: 1 + += Final grade: 1 =============================================================== |
