aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-07-26 23:17:36 +0200
committerCharles <sircharlesaze@gmail.com>2019-07-26 23:17:36 +0200
commit8ec5431354bdb582455e8c32758098c5a0fdada2 (patch)
tree480c68814f822439850029df0e0249a2cafb8177
parent475449dd4b1f3308bac6f72c34d87812216a0738 (diff)
downloadpiscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.gz
piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.bz2
piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.zip
exam final
-rwxr-xr-xexam_final/rendu/__GIT_HISTORY122
-rwxr-xr-xexam_final/rendu/aff_last_param/aff_last_param.c31
-rwxr-xr-xexam_final/rendu/aff_z/aff_z.c21
-rwxr-xr-xexam_final/rendu/brainfuck/brainfuck.c85
-rwxr-xr-xexam_final/rendu/brainfuck/stack.c42
-rwxr-xr-xexam_final/rendu/brainfuck/stack.h26
-rwxr-xr-xexam_final/rendu/count_alpha/count_alpha.c109
-rwxr-xr-xexam_final/rendu/ft_atoi/ft_atoi.c38
-rwxr-xr-xexam_final/rendu/ft_itoa/ft_itoa.c64
-rwxr-xr-xexam_final/rendu/ft_putstr/ft_putstr.c19
-rwxr-xr-xexam_final/rendu/ft_split/ft_split.c74
-rwxr-xr-xexam_final/rendu/ft_strrev/ft_strrev.c40
-rwxr-xr-xexam_final/rendu/last_word/last_word.c50
-rwxr-xr-xexam_final/rendu/ord_alphlong/helper.c52
-rwxr-xr-xexam_final/rendu/ord_alphlong/helper2.c77
-rwxr-xr-xexam_final/rendu/ord_alphlong/helper3.c75
-rwxr-xr-xexam_final/rendu/ord_alphlong/include.h42
-rwxr-xr-xexam_final/rendu/ord_alphlong/main.c32
-rwxr-xr-xexam_final/rendu/rotone/rotone.c50
-rwxr-xr-xexam_final/rendu/sort_list/sort_list.c49
-rw-r--r--exam_final/subjects/0-0-aff_z/examples.txt8
-rw-r--r--exam_final/subjects/0-0-aff_z/subject.en.txt21
-rw-r--r--exam_final/subjects/0-0-aff_z/subject.fr.txt22
-rw-r--r--exam_final/subjects/1-0-ft_putstr/subject.en.txt13
-rw-r--r--exam_final/subjects/1-0-ft_putstr/subject.fr.txt12
-rw-r--r--exam_final/subjects/10-0-count_alpha/subject.en.txt25
-rw-r--r--exam_final/subjects/10-0-count_alpha/subject.fr.txt24
-rw-r--r--exam_final/subjects/11-0-ord_alphlong/examples.txt18
-rw-r--r--exam_final/subjects/11-0-ord_alphlong/subject.en.txt40
-rw-r--r--exam_final/subjects/11-0-ord_alphlong/subject.fr.txt41
-rw-r--r--exam_final/subjects/12-0-brainfuck/examples.txt6
-rw-r--r--exam_final/subjects/12-0-brainfuck/subject.en.txt32
-rw-r--r--exam_final/subjects/12-0-brainfuck/subject.fr.txt32
-rw-r--r--exam_final/subjects/13-0-infin_add/examples.txt7
-rw-r--r--exam_final/subjects/13-0-infin_add/subject.en.txt24
-rw-r--r--exam_final/subjects/13-0-infin_add/subject.fr.txt25
-rw-r--r--exam_final/subjects/2-0-aff_last_param/subject.en.txt18
-rw-r--r--exam_final/subjects/2-0-aff_last_param/subject.fr.txt17
-rw-r--r--exam_final/subjects/3-0-rotone/examples.txt12
-rw-r--r--exam_final/subjects/3-0-rotone/subject.en.txt28
-rw-r--r--exam_final/subjects/3-0-rotone/subject.fr.txt31
-rw-r--r--exam_final/subjects/4-0-ft_strrev/subject.en.txt12
-rw-r--r--exam_final/subjects/4-0-ft_strrev/subject.fr.txt12
-rw-r--r--exam_final/subjects/5-0-last_word/examples.txt11
-rw-r--r--exam_final/subjects/5-0-last_word/subject.en.txt25
-rw-r--r--exam_final/subjects/5-0-last_word/subject.fr.txt27
-rw-r--r--exam_final/subjects/6-0-ft_atoi/subject.en.txt13
-rw-r--r--exam_final/subjects/6-0-ft_atoi/subject.fr.txt12
-rw-r--r--exam_final/subjects/7-0-ft_itoa/subject.en.txt11
-rw-r--r--exam_final/subjects/7-0-ft_itoa/subject.fr.txt12
-rw-r--r--exam_final/subjects/8-0-ft_split/subject.en.txt14
-rw-r--r--exam_final/subjects/8-0-ft_split/subject.fr.txt16
-rw-r--r--exam_final/subjects/9-0-sort_list/list.h19
-rw-r--r--exam_final/subjects/9-0-sort_list/subject.en.txt32
-rw-r--r--exam_final/subjects/9-0-sort_list/subject.fr.txt32
55 files changed, 1802 insertions, 0 deletions
diff --git a/exam_final/rendu/__GIT_HISTORY b/exam_final/rendu/__GIT_HISTORY
new file mode 100755
index 0000000..6286ca2
--- /dev/null
+++ b/exam_final/rendu/__GIT_HISTORY
@@ -0,0 +1,122 @@
+commit 34f8b0fa88a10c6066047c6fd5902a1f61fb7139
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 17:45:42 2019 +0200
+
+ brainfuck
+
+ brainfuck/brainfuck.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ brainfuck/stack.c | 42 +++++++++++++++++++++++++
+ brainfuck/stack.h | 26 ++++++++++++++++
+ 3 files changed, 153 insertions(+)
+
+commit b3f3fe0a53e3b5dfe186cbf50701ff9047f37705
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 16:39:24 2019 +0200
+
+ ord_alphlong
+
+ ord_alphlong/helper.c | 52 ++++++++++++++++++++++++++++++++++
+ ord_alphlong/helper2.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ ord_alphlong/helper3.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
+ ord_alphlong/include.h | 42 +++++++++++++++++++++++++++
+ ord_alphlong/main.c | 32 +++++++++++++++++++++
+ 5 files changed, 278 insertions(+)
+
+commit 80849735bdeb1452a6275fee2594b1407e9afcce
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 14:31:26 2019 +0200
+
+ count_alpha
+
+ count_alpha/count_alpha.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 109 insertions(+)
+
+commit e198992e2e0673e33fecd38897f3fc41b186c82c
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 13:34:08 2019 +0200
+
+ sort_list
+
+ sort_list/sort_list.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 49 insertions(+)
+
+commit 2f7b14a42f21d2598b99d668cbd75c121fa0e28e
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 13:09:52 2019 +0200
+
+ ft_split
+
+ ft_split/ft_split.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 74 insertions(+)
+
+commit 1b5c95b498c6286a77677a1c101a8208e56af4ce
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 12:33:28 2019 +0200
+
+ ft_itoa
+
+ ft_itoa/ft_itoa.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 64 insertions(+)
+
+commit 329e7a2c15e26d350d651af2571829c2a25c0666
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 11:33:31 2019 +0200
+
+ ft_atoi
+
+ ft_atoi/ft_atoi.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
+
+commit cb2d8246d609fc0d347f19124e57e516f2360c59
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 11:09:08 2019 +0200
+
+ last_word
+
+ last_word/last_word.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
+
+commit 93bec2c03948516c977dc726ebcbd29d1cf87af2
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 10:41:13 2019 +0200
+
+ ft_strrev
+
+ ft_strrev/ft_strrev.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 40 insertions(+)
+
+commit 22e59a40561ff53f5f65d90d48d7061bfc4f9280
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 10:32:44 2019 +0200
+
+ rotone
+
+ rotone/rotone.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
+
+commit 41aa95d06869add95fa1078bd18b1d58122fa011
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 10:14:58 2019 +0200
+
+ aff_last_param
+
+ aff_last_param/aff_last_param.c | 31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+commit a338cec36af53b43e95ff0de679288068b212a22
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 10:08:09 2019 +0200
+
+ ft_putstr
+
+ ft_putstr/ft_putstr.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+commit de79154201b309ec32e35f5a26dc675a3c4e0b1e
+Author: Exam 42 <exam-no-reply@42.fr>
+Date: Fri Jul 26 10:05:03 2019 +0200
+
+ aff_z
+
+ aff_z/aff_z.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
diff --git a/exam_final/rendu/aff_last_param/aff_last_param.c b/exam_final/rendu/aff_last_param/aff_last_param.c
new file mode 100755
index 0000000..27a024a
--- /dev/null
+++ b/exam_final/rendu/aff_last_param/aff_last_param.c
@@ -0,0 +1,31 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* aff_last_param.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 10:09:02 by exam #+# #+# */
+/* Updated: 2019/07/26 10:13:09 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <unistd.h>
+
+int ft_strlen(char *str)
+{
+ int counter;
+
+ counter = 0;
+ while (str[counter])
+ counter++;
+ return (counter);
+}
+
+int main(int argc, char **argv)
+{
+ if (argc != 1)
+ write(1, argv[argc - 1], ft_strlen(argv[argc - 1]));
+ write(1, "\n", 1);
+ return (0);
+}
diff --git a/exam_final/rendu/aff_z/aff_z.c b/exam_final/rendu/aff_z/aff_z.c
new file mode 100755
index 0000000..3cb7625
--- /dev/null
+++ b/exam_final/rendu/aff_z/aff_z.c
@@ -0,0 +1,21 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* aff_z.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 10:00:33 by exam #+# #+# */
+/* Updated: 2019/07/26 10:02:22 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <unistd.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc;
+ (void)argv;
+ write(STDOUT_FILENO, "z\n", 2);
+ return (0);
+}
diff --git a/exam_final/rendu/brainfuck/brainfuck.c b/exam_final/rendu/brainfuck/brainfuck.c
new file mode 100755
index 0000000..4cd619d
--- /dev/null
+++ b/exam_final/rendu/brainfuck/brainfuck.c
@@ -0,0 +1,85 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* brainfuck.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 16:42:44 by exam #+# #+# */
+/* Updated: 2019/07/26 17:43:25 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "stack.h"
+#include <stdlib.h>
+#include <unistd.h>
+
+void go_close(char **str)
+{
+ t_stack *st;
+
+ st = create_elem(**str);
+ while (st != NULL)
+ {
+ (*str)++;
+ if (**str == '[')
+ st = push(st, '[');
+ if (**str == ']')
+ st = pop(st);
+ }
+}
+
+void go_open(char **str)
+{
+ t_stack *st;
+
+ st = create_elem(**str);
+ while (st != NULL)
+ {
+ (*str)--;
+ if (**str == ']')
+ st = push(st, ']');
+ if (**str == '[')
+ st = pop(st);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ char *ptr;
+ char *origin;
+ char *str;
+ int i;
+
+ if (argc != 2)
+ {
+ write(1, "\n", 1);
+ return (0);
+ }
+ origin = (char*)malloc(2048);
+ ptr = origin;
+ i = 0;
+ while (i < 2048)
+ ptr[i++] = 0;
+ str = argv[1];
+ while (*str)
+ {
+ if (*str == '>')
+ ptr++;
+ else if (*str == '<')
+ ptr--;
+ else if (*str == '+')
+ (*ptr)++;
+ else if (*str == '-')
+ (*ptr)--;
+ else if (*str == '.')
+ write(1, ptr, 1);
+ else if (*str == '[' && *ptr == 0)
+ go_close(&str);
+ else if (*str == ']' && *ptr != 0)
+ go_open(&str);
+ str++;
+ }
+ free(origin);
+ return (0);
+}
diff --git a/exam_final/rendu/brainfuck/stack.c b/exam_final/rendu/brainfuck/stack.c
new file mode 100755
index 0000000..c79c039
--- /dev/null
+++ b/exam_final/rendu/brainfuck/stack.c
@@ -0,0 +1,42 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* stack.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 17:28:55 by exam #+# #+# */
+/* Updated: 2019/07/26 17:40:35 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <stdlib.h>
+#include "stack.h"
+
+t_stack *create_elem(char data)
+{
+ t_stack *elem;
+
+ elem = malloc(sizeof(t_stack));
+ elem->data = data;
+ elem->next = NULL;
+ return (elem);
+}
+
+t_stack *push(t_stack *stack, char data)
+{
+ t_stack *elem;
+
+ elem = create_elem(data);
+ elem->next = stack;
+ return (elem);
+}
+
+t_stack *pop(t_stack *stack)
+{
+ t_stack *tmp;
+
+ tmp = stack->next;
+ free(stack);
+ return (tmp);
+}
diff --git a/exam_final/rendu/brainfuck/stack.h b/exam_final/rendu/brainfuck/stack.h
new file mode 100755
index 0000000..6d0d57b
--- /dev/null
+++ b/exam_final/rendu/brainfuck/stack.h
@@ -0,0 +1,26 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* stack.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 17:33:37 by exam #+# #+# */
+/* Updated: 2019/07/26 17:39:15 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef STACK_H
+# define STACK_H
+
+typedef struct s_stack
+{
+ char data;
+ struct s_stack *next;
+} t_stack;
+
+t_stack *push(t_stack *stack, char data);
+t_stack *create_elem(char data);
+t_stack *pop(t_stack *stack);
+
+#endif
diff --git a/exam_final/rendu/count_alpha/count_alpha.c b/exam_final/rendu/count_alpha/count_alpha.c
new file mode 100755
index 0000000..ed502a5
--- /dev/null
+++ b/exam_final/rendu/count_alpha/count_alpha.c
@@ -0,0 +1,109 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* count_alpha.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 13:36:33 by exam #+# #+# */
+/* Updated: 2019/07/26 14:30:23 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <stdio.h>
+#include <unistd.h>
+
+typedef struct s_counter
+{
+ char letter;
+ int count;
+} t_counter;
+
+int in_counters(t_counter *counters, char c)
+{
+ int i;
+
+ i = 0;
+ while (counters[i].letter)
+ {
+ if (c == counters[i].letter)
+ return (1);
+ i++;
+ }
+ return (0);
+}
+
+void str_tolow(char *str)
+{
+ while (*str)
+ {
+ if (*str >= 'A' && *str <= 'Z')
+ *str += 'a' - 'A';
+ str++;
+ }
+}
+
+int count_char(char c, char *str)
+{
+ int counter;
+
+ counter = 0;
+ while (*str)
+ {
+ if (c == *str)
+ counter++;
+ str++;
+ }
+ return (counter);
+}
+
+void print_counters(t_counter *counters, int size)
+{
+ int i;
+
+ i = 0;
+ while (i < size)
+ {
+ if (counters[i].count != 0)
+ {
+ printf("%d%c", counters[i].count, counters[i].letter);
+ if (i != size - 1)
+ printf(", ");
+ }
+ i++;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ t_counter counters[26];
+ int i;
+ int j;
+
+ if (argc == 2)
+ {
+ i = 0;
+ j = 0;
+ while (i < 26)
+ {
+ counters[i].letter = '\0';
+ counters[i].count = 0;
+ i++;
+ }
+ str_tolow(argv[1]);
+ i = 0;
+ while (argv[1][i])
+ {
+ if (argv[1][i] >= 'a' && argv[1][i] <= 'z' && !in_counters(counters, argv[1][i]))
+ {
+ counters[j].letter = argv[1][i];
+ counters[j].count = count_char(argv[1][i], argv[1]);
+ j++;
+ }
+ i++;
+ }
+ print_counters(counters, j);
+ }
+ printf("\n");
+ return (0);
+}
diff --git a/exam_final/rendu/ft_atoi/ft_atoi.c b/exam_final/rendu/ft_atoi/ft_atoi.c
new file mode 100755
index 0000000..2f125bf
--- /dev/null
+++ b/exam_final/rendu/ft_atoi/ft_atoi.c
@@ -0,0 +1,38 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_atoi.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 11:11:42 by exam #+# #+# */
+/* Updated: 2019/07/26 11:32:51 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+int ft_atoi(const char *str)
+{
+ int nb;
+ int is_negative;
+
+ while (*str == ' ' || *str == '\t' || *str == '\n' || *str == '\r'
+ || *str == '\v' || *str == '\f'|| *str == '\r')
+ str++;
+ is_negative = 0;
+ if (*str == '+' || *str == '-')
+ {
+ if (*str == '-')
+ is_negative = 1;
+ str++;
+ }
+ nb = 0;
+ while (*str >= '0' && *str <= '9')
+ {
+ nb *= 10;
+ nb += *str - '0';
+ str++;
+ }
+ if (is_negative)
+ nb = -nb;
+ return (nb);
+}
diff --git a/exam_final/rendu/ft_itoa/ft_itoa.c b/exam_final/rendu/ft_itoa/ft_itoa.c
new file mode 100755
index 0000000..308cb41
--- /dev/null
+++ b/exam_final/rendu/ft_itoa/ft_itoa.c
@@ -0,0 +1,64 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_itoa.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 11:35:43 by exam #+# #+# */
+/* Updated: 2019/07/26 12:32:57 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <stdlib.h>
+
+int count_len(int nbr)
+{
+ int counter;
+ unsigned int u_nbr;
+
+ if (nbr == 0)
+ return (1);
+ counter = 0;
+ u_nbr = nbr;
+ if (nbr < 0)
+ {
+ counter++;
+ u_nbr = -nbr;
+ }
+ while (u_nbr > 0)
+ {
+ u_nbr /= 10;
+ counter++;
+ }
+ return (counter);
+}
+
+char *ft_itoa(int nbr)
+{
+ char *str;
+ int len;
+ int is_negative;
+ unsigned int u_nbr;
+
+ len = count_len(nbr);
+ if ((str = (char*)malloc(sizeof(char) * (len + 1))) == NULL)
+ return (NULL);
+ str[len] = '\0';
+ is_negative = 0;
+ u_nbr = nbr;
+ if (nbr < 0)
+ {
+ is_negative = 1;
+ str[0] = '-';
+ u_nbr = -nbr;
+ }
+ len--;
+ while (len >= (is_negative ? 1 : 0))
+ {
+ str[len] = u_nbr % 10 + '0';
+ u_nbr /= 10;
+ len--;
+ }
+ return (str);
+}
diff --git a/exam_final/rendu/ft_putstr/ft_putstr.c b/exam_final/rendu/ft_putstr/ft_putstr.c
new file mode 100755
index 0000000..3733591
--- /dev/null
+++ b/exam_final/rendu/ft_putstr/ft_putstr.c
@@ -0,0 +1,19 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_putstr.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 10:05:51 by exam #+# #+# */
+/* Updated: 2019/07/26 10:07:27 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <unistd.h>
+
+void ft_putstr(char *str)
+{
+ while (*str)
+ write(STDOUT_FILENO, str++, 1);
+}
diff --git a/exam_final/rendu/ft_split/ft_split.c b/exam_final/rendu/ft_split/ft_split.c
new file mode 100755
index 0000000..75d9f8d
--- /dev/null
+++ b/exam_final/rendu/ft_split/ft_split.c
@@ -0,0 +1,74 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_split.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/26 12:35:48 by exam #+# #+# */
+/* Updated: 2019/07/26 13:09:10 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <stdlib.h>
+
+int in_charset(char c)
+{
+ return (c == ' ' || c == '\n' || c == '\t');
+}
+
+int