├── level ├── exam.tar ├── 0-0-maff_alpha │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 3-4-paramsum │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 0-2-aff_z │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-4-do_op │ ├── examples.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 3-0-pgcd │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 3-0-hidenp │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 0-1-only_z │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-0-inter │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 4-6-rostring │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 5-0-brainfuck │ └── examples.txt ├── 2-0-last_word │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 1-2-first_word │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 1-3-first_word │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 4-1-rev_wstr │ ├── examples.txt │ └── subject.ro.txt ├── 1-0-ft_strlen │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-3-wdmatch │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-0-union │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 4-0-fprime │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 1-0-ft_strcpy │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-0-ft_strdup │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-5-ft_strcmp │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 0-0-ft_countdown │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 1-0-ft_swap │ ├── \ │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── 1-2-ft_swap │ ├── \ │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── 3-0-epur_str │ ├── examples.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 0-0-ft_print_numbers │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-5-ft_strrev │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 3-1-tab_mult │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 3-1-expand_str │ ├── examples.txt │ └── subject.en.txt ├── 1-2-ft_putstr │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── 3-4-str_capitalizer │ └── examples.txt ├── 4-4-ft_itoa │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 3-0-rstr_capitalizer │ ├── examples.txt │ └── subject.en.txt ├── 2-0-ft_atoi │ ├── subject.fr.txt │ └── subject.en.txt ├── 2-4-print_bits │ ├── subject.fr.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 4-1-sort_int_tab │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 4-3-sort_int_tab │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 2-1-max │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 1-0-ulstr │ ├── examples.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 2-0-swap_bits │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-0-reverse_bits │ ├── subject.en.txt │ └── subject.fr.txt ├── 1-0-rev_print │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 1-3-rev_print │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 4-0-ft_split │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 0-1-aff_last_param │ ├── subject.fr.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 3-0-print_hex │ ├── subject.ro.txt │ ├── subject.fr.txt │ └── subject.en.txt ├── 3-0-ft_list_size │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 0-0-aff_a │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 3-0-add_prime_sum │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 4-2-ft_list_remove_if │ ├── subject.ro.txt │ ├── subject.fr.txt │ └── subject.en.txt ├── 4-0-ft_list_foreach │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 4-4-ft_list_foreach │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 2-1-alpha_mirror │ ├── subject.fr.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 3-0-ft_rrange │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 3-3-ft_range │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 1-1-rot_13 │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 3-2-ft_atoi_base │ ├── subject.en.txt │ └── subject.fr.txt ├── 1-0-repeat_alpha │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 5-2-ft_itoa_base │ ├── subject.en.txt │ └── subject.fr.txt ├── 5-1-print_memory │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt └── 4-3-sort_list │ └── list.h ├── Exam00 ├── 2-0-maff_alpha │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 1-1-hello │ ├── examples.txt │ ├── subject.fr.txt │ ├── subject.ro.txt │ ├── subject.en.txt │ └── 1-1-hello.trace.txt ├── 0-0-only_z │ ├── subject.en.txt │ ├── subject.ro.txt │ ├── subject.fr.txt │ ├── rendu │ │ └── only_z.c │ └── 0-0-only_z.trace.txt ├── 3-1-ft_strcpy │ ├── subject.en.txt │ ├── subject.ro.txt │ ├── subject.fr.txt │ └── 3-1-ft_strcpy.trace.txt ├── 1-2-ft_countdown │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── 1-0-ft_print_numbers │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 3-0-ft_strrev │ ├── subject.en.txt │ ├── subject.ro.txt │ ├── subject.fr.txt │ └── rendu │ │ └── st_strrev.c ├── 3-2-ft_swap │ ├── subject.ro.txt │ ├── subject.en.txt │ ├── subject.fr.txt │ └── rendu │ │ └── ft_swap.c ├── 4-0-ft_atoi │ ├── subject.fr.txt │ ├── subject.en.txt │ └── 4-0-ft_atoi.trace.txt └── result.txt ├── ExamFinal ├── 0-0-hello │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.fr.txt │ ├── subject.ro.txt │ └── rendu │ │ └── hello.c ├── 3-0-pgcd │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 5-0-brainfuck │ ├── examples.txt │ └── rendu │ │ └── brainfuck.h ├── 2-0-last_word │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 4-0-fprime │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── result.txt ├── 5-1-ft_itoa_base │ ├── subject.en.txt │ └── subject.fr.txt └── 5-2-print_memory │ ├── 5-2-print_memory.trace.txt │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── Exam01 ├── 2-0-print_bits │ ├── rendu │ │ └── a.out │ ├── subject.fr.txt │ ├── subject.en.txt │ └── subject.ro.txt ├── 3-0-expand_str │ ├── rendu │ │ └── a.out │ ├── examples.txt │ └── subject.en.txt ├── 0-0-only_a │ ├── subject.en.txt │ ├── subject.ro.txt │ ├── subject.fr.txt │ ├── rendu │ │ └── only_a.c │ └── 0-0-only_a.trace.txt ├── 4-0-rostring │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt └── result.txt ├── Exam02 ├── 5-1-brainfuck │ ├── examples.txt │ └── 5-1-brainfuck.trace.txt ├── 2-1-last_word │ ├── examples.txt │ ├── subject.en.txt │ ├── subject.ro.txt │ └── subject.fr.txt ├── 0-0-ft_countdown │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── 1-0-ft_putstr │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt ├── 2-0-swap_bits │ ├── subject.en.txt │ ├── subject.ro.txt │ ├── subject.fr.txt │ └── 2-0-swap_bits.trace.txt ├── result.txt ├── 3-0-add_prime_sum │ ├── subject.en.txt │ ├── subject.fr.txt │ └── subject.ro.txt ├── 4-0-ft_list_remove_if │ ├── subject.ro.txt │ ├── subject.fr.txt │ └── subject.en.txt ├── 5-0-ft_itoa_base │ ├── subject.en.txt │ └── subject.fr.txt └── 5-2-print_memory │ ├── 5-2-print_memory.trace.txt │ ├── subject.ro.txt │ ├── subject.en.txt │ └── subject.fr.txt └── Training └── level1 ├── ft_swap.c └── ft_strlen.c /level/exam.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pausemana/ExamShell/HEAD/level/exam.tar -------------------------------------------------------------------------------- /Exam00/2-0-maff_alpha/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./maff_alpha | cat -e 2 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 3 | -------------------------------------------------------------------------------- /level/0-0-maff_alpha/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./maff_alpha | cat -e 2 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 3 | -------------------------------------------------------------------------------- /Exam00/1-1-hello/examples.txt: -------------------------------------------------------------------------------- 1 | $>./hello 2 | Hello World! 3 | $>./hello | cat -e 4 | Hello World!$ 5 | $> 6 | -------------------------------------------------------------------------------- /ExamFinal/0-0-hello/examples.txt: -------------------------------------------------------------------------------- 1 | $>./hello 2 | Hello World! 3 | $>./hello | cat -e 4 | Hello World!$ 5 | $> 6 | -------------------------------------------------------------------------------- /Exam01/2-0-print_bits/rendu/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pausemana/ExamShell/HEAD/Exam01/2-0-print_bits/rendu/a.out -------------------------------------------------------------------------------- /Exam01/3-0-expand_str/rendu/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pausemana/ExamShell/HEAD/Exam01/3-0-expand_str/rendu/a.out -------------------------------------------------------------------------------- /level/3-4-paramsum/examples.txt: -------------------------------------------------------------------------------- 1 | $>./paramsum 1 2 3 5 7 24 2 | 6 3 | $>./paramsum 6 12 24 | cat -e 4 | 3$ 5 | $>./paramsum | cat -e 6 | 0$ 7 | $> 8 | -------------------------------------------------------------------------------- /level/0-2-aff_z/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./aff_z "abc" | cat -e 2 | z$ 3 | $> ./aff_z "dubO a POIL" | cat -e 4 | z$ 5 | $> ./aff_z "zaz sent le poney" | cat -e 6 | z$ 7 | $> ./aff_z | cat -e 8 | z$ 9 | -------------------------------------------------------------------------------- /level/2-4-do_op/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./do_op "123" "*" 456 | cat -e 2 | 56088$ 3 | $> ./do_op "9828" "/" 234 | cat -e 4 | 42$ 5 | $> ./do_op "1" "+" "-43" | cat -e 6 | -42$ 7 | $> ./do_op | cat -e 8 | $ 9 | -------------------------------------------------------------------------------- /level/3-0-pgcd/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./pgcd 42 10 | cat -e 2 | 2$ 3 | $> ./pgcd 42 12 | cat -e 4 | 6$ 5 | $> ./pgcd 14 77 | cat -e 6 | 7$ 7 | $> ./pgcd 17 3 | cat -e 8 | 1$ 9 | $> ./pgcd | cat -e 10 | $ 11 | -------------------------------------------------------------------------------- /ExamFinal/3-0-pgcd/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./pgcd 42 10 | cat -e 2 | 2$ 3 | $> ./pgcd 42 12 | cat -e 4 | 6$ 5 | $> ./pgcd 14 77 | cat -e 6 | 7$ 7 | $> ./pgcd 17 3 | cat -e 8 | 1$ 9 | $> ./pgcd | cat -e 10 | $ 11 | -------------------------------------------------------------------------------- /level/3-0-hidenp/examples.txt: -------------------------------------------------------------------------------- 1 | $>./hidenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e 2 | 1$ 3 | $>./hidenp "abc" "2altrb53c.sse" | cat -e 4 | 1$ 5 | $>./hidenp "abc" "btarc" | cat -e 6 | 0$ 7 | $>./hidenp | cat -e 8 | $ 9 | $> 10 | 11 | -------------------------------------------------------------------------------- /Exam00/0-0-only_z/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_z 2 | Expected files : only_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays a 'z' character on the standard output. 7 | -------------------------------------------------------------------------------- /Exam00/0-0-only_z/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_z 2 | Expected files : only_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza caracterul 'z' la iesirea standard. 7 | -------------------------------------------------------------------------------- /Exam01/0-0-only_a/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_a 2 | Expected files : only_a.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays an 'a' character on the standard output. 7 | -------------------------------------------------------------------------------- /Exam01/0-0-only_a/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_a 2 | Expected files : only_a.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza caracterul 'a' la iesirea standard. 7 | -------------------------------------------------------------------------------- /level/0-1-only_z/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_z 2 | Expected files : only_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays a 'z' character on the standard output. 7 | -------------------------------------------------------------------------------- /level/0-1-only_z/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_z 2 | Expected files : only_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza caracterul 'z' la iesirea standard. 7 | -------------------------------------------------------------------------------- /Exam00/0-0-only_z/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_z 2 | Expected files : only_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche un caractère 'z' sur la sortie standard. 7 | -------------------------------------------------------------------------------- /Exam01/0-0-only_a/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_a 2 | Expected files : only_a.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche un caractère 'a' sur la sortie standard. 7 | -------------------------------------------------------------------------------- /level/0-1-only_z/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : only_z 2 | Expected files : only_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche un caractère 'z' sur la sortie standard. 7 | -------------------------------------------------------------------------------- /level/2-0-inter/examples.txt: -------------------------------------------------------------------------------- 1 | $>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 2 | padinto$ 3 | $>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 4 | df6ewg4$ 5 | $>./inter "rien" "cette phrase ne cache rien" | cat -e 6 | rien$ 7 | $>./inter | cat -e 8 | $ 9 | 10 | -------------------------------------------------------------------------------- /level/4-6-rostring/examples.txt: -------------------------------------------------------------------------------- 1 | $>./rostring "abc " | cat -e 2 | abc$ 3 | $> 4 | $>./rostring "Que la lumiere soit et la lumiere fut" 5 | la lumiere soit et la lumiere fut Que 6 | $> 7 | $>./rostring " AkjhZ zLKIJz , 23y" 8 | zLKIJz , 23y AkjhZ 9 | $> 10 | $>./rostring | cat -e 11 | $ 12 | $> 13 | -------------------------------------------------------------------------------- /Exam01/4-0-rostring/examples.txt: -------------------------------------------------------------------------------- 1 | $>./rostring "abc " | cat -e 2 | abc$ 3 | $> 4 | $>./rostring "Que la lumiere soit et la lumiere fut" 5 | la lumiere soit et la lumiere fut Que 6 | $> 7 | $>./rostring " AkjhZ zLKIJz , 23y" 8 | zLKIJz , 23y AkjhZ 9 | $> 10 | $>./rostring | cat -e 11 | $ 12 | $> 13 | -------------------------------------------------------------------------------- /Exam02/5-1-brainfuck/examples.txt: -------------------------------------------------------------------------------- 1 | $>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e 2 | Hello World!$ 3 | $>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e 4 | Hi$ 5 | $>./brainfuck | cat -e 6 | $ 7 | -------------------------------------------------------------------------------- /ExamFinal/5-0-brainfuck/examples.txt: -------------------------------------------------------------------------------- 1 | $>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e 2 | Hello World!$ 3 | $>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e 4 | Hi$ 5 | $>./brainfuck | cat -e 6 | $ 7 | -------------------------------------------------------------------------------- /level/5-0-brainfuck/examples.txt: -------------------------------------------------------------------------------- 1 | $>./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e 2 | Hello World!$ 3 | $>./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e 4 | Hi$ 5 | $>./brainfuck | cat -e 6 | $ 7 | -------------------------------------------------------------------------------- /Exam02/2-1-last_word/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./last_word "FOR PONY" | cat -e 2 | PONY$ 3 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 4 | not$ 5 | $> ./last_word " " | cat -e 6 | $ 7 | $> ./last_word "a" "b" | cat -e 8 | $ 9 | $> ./last_word " lorem,ipsum " | cat -e 10 | lorem,ipsum$ 11 | $> 12 | -------------------------------------------------------------------------------- /level/2-0-last_word/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./last_word "FOR PONY" | cat -e 2 | PONY$ 3 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 4 | not$ 5 | $> ./last_word " " | cat -e 6 | $ 7 | $> ./last_word "a" "b" | cat -e 8 | $ 9 | $> ./last_word " lorem,ipsum " | cat -e 10 | lorem,ipsum$ 11 | $> 12 | -------------------------------------------------------------------------------- /ExamFinal/2-0-last_word/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./last_word "FOR PONY" | cat -e 2 | PONY$ 3 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 4 | not$ 5 | $> ./last_word " " | cat -e 6 | $ 7 | $> ./last_word "a" "b" | cat -e 8 | $ 9 | $> ./last_word " lorem,ipsum " | cat -e 10 | lorem,ipsum$ 11 | $> 12 | -------------------------------------------------------------------------------- /level/1-2-first_word/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./first_word "FOR PONY" | cat -e 2 | FOR$ 3 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 4 | this$ 5 | $> ./first_word " " | cat -e 6 | $ 7 | $> ./first_word "a" "b" | cat -e 8 | $ 9 | $> ./first_word " lorem,ipsum " | cat -e 10 | lorem,ipsum$ 11 | $> 12 | -------------------------------------------------------------------------------- /level/1-3-first_word/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./first_word "FOR PONY" | cat -e 2 | FOR$ 3 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 4 | this$ 5 | $> ./first_word " " | cat -e 6 | $ 7 | $> ./first_word "a" "b" | cat -e 8 | $ 9 | $> ./first_word " lorem,ipsum " | cat -e 10 | lorem,ipsum$ 11 | $> 12 | -------------------------------------------------------------------------------- /level/4-1-rev_wstr/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./rev_wstr "le temps du mepris precede celui de l'indifference" | cat -e 2 | l'indifference de celui precede mepris du temps le$ 3 | $> ./rev_wstr "abcdefghijklm" 4 | abcdefghijklm 5 | $> ./rev_wstr "il contempla le mont" | cat -e 6 | mont le contempla il$ 7 | $> ./rev_wstr | cat -e 8 | $ 9 | $> 10 | -------------------------------------------------------------------------------- /level/1-0-ft_strlen/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strlen 2 | Expected files : ft_strlen.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that returns the length of a string. 7 | 8 | Your function must be declared as follows: 9 | 10 | int ft_strlen(char *str); 11 | -------------------------------------------------------------------------------- /level/2-3-wdmatch/examples.txt: -------------------------------------------------------------------------------- 1 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e 2 | faya$ 3 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e 4 | $ 5 | $>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e 6 | quarante deux$ 7 | $>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e 8 | $ 9 | $>./wdmatch | cat -e 10 | $ 11 | -------------------------------------------------------------------------------- /level/2-0-union/examples.txt: -------------------------------------------------------------------------------- 1 | $>./union zpadinton "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 2 | zpadintoqefwjy$ 3 | $>./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 4 | df6vewg4thras$ 5 | $>./union "rien" "cette phrase ne cache rien" | cat -e 6 | rienct phas$ 7 | $>./union | cat -e 8 | $ 9 | $> 10 | $>./union "rien" | cat -e 11 | $ 12 | $> 13 | 14 | -------------------------------------------------------------------------------- /level/4-0-fprime/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./fprime 225225 | cat -e 2 | 3*3*5*5*7*11*13$ 3 | $> ./fprime 8333325 | cat -e 4 | 3*3*5*5*7*11*13*37$ 5 | $> ./fprime 9539 | cat -e 6 | 9539$ 7 | $> ./fprime 804577 | cat -e 8 | 804577$ 9 | $> ./fprime 42 | cat -e 10 | 2*3*7$ 11 | $> ./fprime 1 | cat -e 12 | 1$ 13 | $> ./fprime | cat -e 14 | $ 15 | $> ./fprime 42 21 | cat -e 16 | $ 17 | -------------------------------------------------------------------------------- /ExamFinal/4-0-fprime/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./fprime 225225 | cat -e 2 | 3*3*5*5*7*11*13$ 3 | $> ./fprime 8333325 | cat -e 4 | 3*3*5*5*7*11*13*37$ 5 | $> ./fprime 9539 | cat -e 6 | 9539$ 7 | $> ./fprime 804577 | cat -e 8 | 804577$ 9 | $> ./fprime 42 | cat -e 10 | 2*3*7$ 11 | $> ./fprime 1 | cat -e 12 | 1$ 13 | $> ./fprime | cat -e 14 | $ 15 | $> ./fprime 42 21 | cat -e 16 | $ 17 | -------------------------------------------------------------------------------- /Exam00/1-1-hello/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : hello 2 | Expected files : hello.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche "Hello World!" suivi d'un \n. 7 | 8 | Exemple: 9 | 10 | $>./hello 11 | Hello World! 12 | $>./hello | cat -e 13 | Hello World!$ 14 | $> 15 | -------------------------------------------------------------------------------- /Exam00/1-1-hello/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : hello 2 | Fisiere de iesire : hello.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza "Hello World!" urmat de '\n'. 7 | 8 | Example: 9 | 10 | $>./hello 11 | Hello World! 12 | $>./hello | cat -e 13 | Hello World!$ 14 | $> 15 | -------------------------------------------------------------------------------- /Exam00/3-1-ft_strcpy/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strcpy 2 | Expected files : ft_strcpy.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduce the behavior of the function strcpy (man strcpy). 7 | 8 | Your function must be declared as follows: 9 | 10 | char *ft_strcpy(char *s1, char *s2); 11 | -------------------------------------------------------------------------------- /level/1-0-ft_strcpy/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strcpy 2 | Expected files : ft_strcpy.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduce the behavior of the function strcpy (man strcpy). 7 | 8 | Your function must be declared as follows: 9 | 10 | char *ft_strcpy(char *s1, char *s2); 11 | -------------------------------------------------------------------------------- /level/1-0-ft_strlen/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strlen 2 | Fisiere de iesire : ft_strlen.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduceti comportamentul functiei strlen (man strlen). 7 | 8 | Functia voastra va trebui sa aiba prototipul urmator: 9 | 10 | int ft_strlen(char *str); 11 | 12 | -------------------------------------------------------------------------------- /level/2-0-ft_strdup/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strdup 2 | Expected files : ft_strdup.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduce the behavior of the function strdup (man strdup). 7 | 8 | Your function must be declared as follows: 9 | 10 | char *ft_strdup(char *src); 11 | -------------------------------------------------------------------------------- /level/2-5-ft_strcmp/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strcmp 2 | Expected files : ft_strcmp.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduce the behavior of the function strcmp (man strcmp). 7 | 8 | Your function must be declared as follows: 9 | 10 | int ft_strcmp(char *s1, char *s2); 11 | -------------------------------------------------------------------------------- /Exam00/1-1-hello/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : hello 2 | Expected files : hello.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays "Hello World!" followed by a \n. 7 | 8 | Example: 9 | 10 | $>./hello 11 | Hello World! 12 | $>./hello | cat -e 13 | Hello World!$ 14 | $> 15 | -------------------------------------------------------------------------------- /ExamFinal/0-0-hello/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : hello 2 | Expected files : hello.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays "Hello World!" followed by a \n. 7 | 8 | Example: 9 | 10 | $>./hello 11 | Hello World! 12 | $>./hello | cat -e 13 | Hello World!$ 14 | $> 15 | -------------------------------------------------------------------------------- /ExamFinal/0-0-hello/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : hello 2 | Expected files : hello.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche "Hello World!" suivi d'un \n. 7 | 8 | Exemple: 9 | 10 | $>./hello 11 | Hello World! 12 | $>./hello | cat -e 13 | Hello World!$ 14 | $> 15 | -------------------------------------------------------------------------------- /ExamFinal/0-0-hello/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : hello 2 | Fisiere de iesire : hello.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza "Hello World!" urmat de '\n'. 7 | 8 | Example: 9 | 10 | $>./hello 11 | Hello World! 12 | $>./hello | cat -e 13 | Hello World!$ 14 | $> 15 | -------------------------------------------------------------------------------- /level/1-0-ft_strlen/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strlen 2 | Expected files : ft_strlen.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui renvoie la longueur d'une chaîne de caractères. 7 | 8 | Elle devra être prototypée de la façon suivante : 9 | 10 | int ft_strlen(char *str); 11 | -------------------------------------------------------------------------------- /level/2-0-ft_strdup/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strdup 2 | Fisiere de iesire : ft_strdup.c 3 | Functii autorizate : malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduceti comportamentul functiei strdup (man strdup). 7 | 8 | Functia voastra va trebui sa aiba prototipul urmator: 9 | 10 | char *ft_strdup(char *src); 11 | 12 | -------------------------------------------------------------------------------- /level/2-5-ft_strcmp/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strcmp 2 | Fisiere de iesire : ft_strcmp.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduceti comportamentul functiei strcmp (man strcmp). 7 | 8 | Functia voastra va treui sa aiba prototipul urmator: 9 | 10 | int ft_strcmp(char *s1, char *s2); 11 | 12 | -------------------------------------------------------------------------------- /Exam00/1-2-ft_countdown/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_countdown 2 | Fisiere de iesire: ft_countdown.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza toate cifrele in ordine descrescatoare, 7 | urmat de '\n'. 8 | 9 | Exemplu: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /Exam00/3-1-ft_strcpy/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strcpy 2 | Fisiere de iesire : ft_strcpy.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduceti comportamentul functiei strcpy (man strcpy). 7 | 8 | Functia voastra va trebui sa aiba prototipul urmator: 9 | 10 | char *ft_strcpy(char *s1, char *s2); 11 | 12 | -------------------------------------------------------------------------------- /Exam02/0-0-ft_countdown/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_countdown 2 | Fisiere de iesire: ft_countdown.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza toate cifrele in ordine descrescatoare, 7 | urmat de '\n'. 8 | 9 | Exemplu: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /level/0-0-ft_countdown/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_countdown 2 | Expected files : ft_countdown.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays all digits in descending order, followed by a 7 | newline. 8 | 9 | Example: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /level/0-0-ft_countdown/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_countdown 2 | Fisiere de iesire: ft_countdown.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care afiseaza toate cifrele in ordine descrescatoare, 7 | urmat de '\n'. 8 | 9 | Exemplu: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /level/1-0-ft_strcpy/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strcpy 2 | Fisiere de iesire : ft_strcpy.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduceti comportamentul functiei strcpy (man strcpy). 7 | 8 | Functia voastra va trebui sa aiba prototipul urmator: 9 | 10 | char *ft_strcpy(char *s1, char *s2); 11 | 12 | -------------------------------------------------------------------------------- /level/1-0-ft_swap/\: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_swap 2 | Fisiere de iesire : ft_swap.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt 7 | transmise ca parametri. 8 | 9 | Ea trebuie sa aibaprototipul urmator: 10 | 11 | void ft_swap(int *a, int *b); 12 | 13 | -------------------------------------------------------------------------------- /level/1-2-ft_swap/\: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_swap 2 | Fisiere de iesire : ft_swap.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt 7 | transmise ca parametri. 8 | 9 | Ea trebuie sa aibaprototipul urmator: 10 | 11 | void ft_swap(int *a, int *b); 12 | 13 | -------------------------------------------------------------------------------- /Exam00/1-2-ft_countdown/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_countdown 2 | Expected files : ft_countdown.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays all digits in descending order, followed by a 7 | newline. 8 | 9 | Example: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /Exam02/0-0-ft_countdown/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_countdown 2 | Expected files : ft_countdown.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays all digits in descending order, followed by a 7 | newline. 8 | 9 | Example: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /level/3-0-epur_str/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./epur_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 2 | vous voyez c'est facile d'afficher la meme chose$ 3 | $> ./epur_str " seulement la c'est plus dur " | cat -e 4 | seulement la c'est plus dur$ 5 | $> ./epur_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 6 | $ 7 | $> ./epur_str "" | cat -e 8 | $ 9 | $> 10 | -------------------------------------------------------------------------------- /Exam00/1-0-ft_print_numbers/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_print_numbers 2 | Expected files : ft_print_numbers.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that displays all digits in ascending order. 7 | 8 | Your function must be declared as follows: 9 | 10 | void ft_print_numbers(void); 11 | 12 | -------------------------------------------------------------------------------- /Exam00/1-0-ft_print_numbers/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_print_numbers 2 | Fisiere de iesire : ft_print_numbers.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce afiseaza toate cifrele, in ordine crescatoare. 7 | 8 | Ea trebuie sa aiba prototipul urmator: 9 | 10 | void ft_print_numbers(void); 11 | 12 | -------------------------------------------------------------------------------- /Exam00/1-2-ft_countdown/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_countdown 2 | Expected files : ft_countdown.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche tous les chiffres en ordre descendant, suivis 7 | d'un newline. 8 | 9 | Exemple: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /Exam00/3-0-ft_strrev/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strrev 2 | Expected files : ft_strrev.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that reverses (in-place) a string. 7 | 8 | It must return its parameter. 9 | 10 | Your function must be declared as follows: 11 | 12 | char *ft_strrev(char *str); 13 | -------------------------------------------------------------------------------- /Exam02/0-0-ft_countdown/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_countdown 2 | Expected files : ft_countdown.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche tous les chiffres en ordre descendant, suivis 7 | d'un newline. 8 | 9 | Exemple: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /level/0-0-ft_countdown/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_countdown 2 | Expected files : ft_countdown.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche tous les chiffres en ordre descendant, suivis 7 | d'un newline. 8 | 9 | Exemple: 10 | $> ./ft_countdown | cat -e 11 | 9876543210$ 12 | $> 13 | -------------------------------------------------------------------------------- /level/0-0-ft_print_numbers/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_print_numbers 2 | Expected files : ft_print_numbers.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that displays all digits in ascending order. 7 | 8 | Your function must be declared as follows: 9 | 10 | void ft_print_numbers(void); 11 | 12 | -------------------------------------------------------------------------------- /level/0-0-ft_print_numbers/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_print_numbers 2 | Fisiere de iesire : ft_print_numbers.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce afiseaza toate cifrele, in ordine crescatoare. 7 | 8 | Ea trebuie sa aiba prototipul urmator: 9 | 10 | void ft_print_numbers(void); 11 | 12 | -------------------------------------------------------------------------------- /level/2-5-ft_strrev/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strrev 2 | Expected files : ft_strrev.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that reverses (in-place) a string. 7 | 8 | It must return its parameter. 9 | 10 | Your function must be declared as follows: 11 | 12 | char *ft_strrev(char *str); 13 | -------------------------------------------------------------------------------- /Exam00/3-2-ft_swap/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_swap 2 | Fisiere de iesire : ft_swap.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt 7 | transmise ca parametri. 8 | 9 | Ea trebuie sa aibaprototipul urmator: 10 | 11 | void ft_swap(int *a, int *b); 12 | 13 | -------------------------------------------------------------------------------- /level/1-0-ft_swap/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_swap 2 | Fisiere de iesire : ft_swap.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt 7 | transmise ca parametri. 8 | 9 | Ea trebuie sa aibaprototipul urmator: 10 | 11 | void ft_swap(int *a, int *b); 12 | 13 | -------------------------------------------------------------------------------- /level/1-2-ft_swap/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_swap 2 | Fisiere de iesire : ft_swap.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce schimba valoarea a doi intregi ale caror adrese sunt 7 | transmise ca parametri. 8 | 9 | Ea trebuie sa aibaprototipul urmator: 10 | 11 | void ft_swap(int *a, int *b); 12 | 13 | -------------------------------------------------------------------------------- /level/3-1-tab_mult/examples.txt: -------------------------------------------------------------------------------- 1 | $>./tab_mult 9 2 | 1 x 9 = 9 3 | 2 x 9 = 18 4 | 3 x 9 = 27 5 | 4 x 9 = 36 6 | 5 x 9 = 45 7 | 6 x 9 = 54 8 | 7 x 9 = 63 9 | 8 x 9 = 72 10 | 9 x 9 = 81 11 | $>./tab_mult 19 12 | 1 x 19 = 19 13 | 2 x 19 = 38 14 | 3 x 19 = 57 15 | 4 x 19 = 76 16 | 5 x 19 = 95 17 | 6 x 19 = 114 18 | 7 x 19 = 133 19 | 8 x 19 = 152 20 | 9 x 19 = 171 21 | $> 22 | $>./tab_mult | cat -e 23 | $ 24 | $> 25 | -------------------------------------------------------------------------------- /Exam00/3-1-ft_strcpy/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strcpy 2 | Expected files : ft_strcpy.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduisez à l'identique le comportement de la fonction strcpy (man strcpy). 7 | 8 | Votre fonction devra être prototypée de la façon suivante : 9 | 10 | char *ft_strcpy(char *s1, char *s2); 11 | -------------------------------------------------------------------------------- /Exam00/3-2-ft_swap/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_swap 2 | Expected files : ft_swap.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that swaps the contents of two integers the adresses of which 7 | are passed as parameters. 8 | 9 | Your function must be declared as follows: 10 | 11 | void ft_swap(int *a, int *b); 12 | -------------------------------------------------------------------------------- /level/1-0-ft_strcpy/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strcpy 2 | Expected files : ft_strcpy.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduisez à l'identique le comportement de la fonction strcpy (man strcpy). 7 | 8 | Votre fonction devra être prototypée de la façon suivante : 9 | 10 | char *ft_strcpy(char *s1, char *s2); 11 | -------------------------------------------------------------------------------- /level/1-0-ft_swap/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_swap 2 | Expected files : ft_swap.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that swaps the contents of two integers the adresses of which 7 | are passed as parameters. 8 | 9 | Your function must be declared as follows: 10 | 11 | void ft_swap(int *a, int *b); 12 | -------------------------------------------------------------------------------- /level/1-2-ft_swap/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_swap 2 | Expected files : ft_swap.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that swaps the contents of two integers the adresses of which 7 | are passed as parameters. 8 | 9 | Your function must be declared as follows: 10 | 11 | void ft_swap(int *a, int *b); 12 | -------------------------------------------------------------------------------- /level/2-0-ft_strdup/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strdup 2 | Expected files : ft_strdup.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduisez à l'identique le comportement de la fonction strdup (man strdup). 7 | 8 | Votre fonction devra être prototypée de la façon suivante : 9 | 10 | char *ft_strdup(char *src); 11 | -------------------------------------------------------------------------------- /level/2-5-ft_strcmp/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strcmp 2 | Expected files : ft_strcmp.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Reproduisez à l'identique le comportement de la fonction strcmp (man strcmp). 7 | 8 | Votre fonction devra être prototypée de la façon suivante : 9 | 10 | int ft_strcmp(char *s1, char *s2); 11 | -------------------------------------------------------------------------------- /level/1-0-ft_swap/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_swap 2 | Expected files : ft_swap.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui échange le contenu de deux entiers dont les adresses 7 | sont passées en paramêtres. 8 | 9 | Elle devra être prototypée de la façon suivante : 10 | 11 | void ft_swap(int *a, int *b); 12 | -------------------------------------------------------------------------------- /level/1-2-ft_swap/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_swap 2 | Expected files : ft_swap.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui échange le contenu de deux entiers dont les adresses 7 | sont passées en paramêtres. 8 | 9 | Elle devra être prototypée de la façon suivante : 10 | 11 | void ft_swap(int *a, int *b); 12 | -------------------------------------------------------------------------------- /Exam00/1-0-ft_print_numbers/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_print_numbers 2 | Expected files : ft_print_numbers.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui affiche tous les chiffres dans l'ordre croissant. 7 | 8 | Elle devra être prototypée de la façon suivante : 9 | 10 | void ft_print_numbers(void); 11 | 12 | -------------------------------------------------------------------------------- /Exam00/3-2-ft_swap/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_swap 2 | Expected files : ft_swap.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui échange le contenu de deux entiers dont les adresses 7 | sont passées en paramêtres. 8 | 9 | Elle devra être prototypée de la façon suivante : 10 | 11 | void ft_swap(int *a, int *b); 12 | -------------------------------------------------------------------------------- /Exam01/result.txt: -------------------------------------------------------------------------------- 1 | Start time: 11/09/2015 15:01:13 UTC 2 | End time: 11/09/2015 19:00:32 UTC 3 | Mode: real 4 | Final grade: 64/100 5 | 6 | Assignments: 7 | Level 4: 8 | 0: rostring for 16 potential points (Current) 9 | 0: only_a for 16 potential points (Success) 10 | 0: print_bits for 16 potential points (Success) 11 | 0: search_and_replace for 16 potential points (Success) 12 | 0: expand_str for 16 potential points (Success) -------------------------------------------------------------------------------- /level/0-0-ft_print_numbers/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_print_numbers 2 | Expected files : ft_print_numbers.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui affiche tous les chiffres dans l'ordre croissant. 7 | 8 | Elle devra être prototypée de la façon suivante : 9 | 10 | void ft_print_numbers(void); 11 | 12 | -------------------------------------------------------------------------------- /Exam00/3-0-ft_strrev/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strrev 2 | Fisiere de iesire : ft_strrev.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce inverseaza (pe loc) un sir de caractere. 7 | 8 | Ea trebuie sa returneze parametrul sau. 9 | 10 | Functia trebuie sa aiba prototipul urmator: 11 | 12 | char *ft_strrev(char *str); 13 | 14 | -------------------------------------------------------------------------------- /level/2-5-ft_strrev/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_strrev 2 | Fisiere de iesire : ft_strrev.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce inverseaza (pe loc) un sir de caractere. 7 | 8 | Ea trebuie sa returneze parametrul sau. 9 | 10 | Functia trebuie sa aiba prototipul urmator: 11 | 12 | char *ft_strrev(char *str); 13 | 14 | -------------------------------------------------------------------------------- /Exam00/3-0-ft_strrev/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strrev 2 | Expected files : ft_strrev.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui inverse (en place) une chaîne de caractères. 7 | 8 | Elle devra renvoyer son paramètre. 9 | 10 | Votre fonction devra être prototypée de la façon suivante : 11 | 12 | char *ft_strrev(char *str); 13 | -------------------------------------------------------------------------------- /Exam01/3-0-expand_str/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 2 | vous voyez c'est facile d'afficher la meme chose$ 3 | $> ./expand_str " seulement la c'est plus dur " | cat -e 4 | seulement la c'est plus dur$ 5 | $> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 6 | $ 7 | $> ./expand_str "" | cat -e 8 | $ 9 | $> 10 | -------------------------------------------------------------------------------- /level/0-0-maff_alpha/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : maff_alpha 2 | Expected files : maff_alpha.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays the alphabet, with even letters in uppercase, and 7 | odd letters in lowercase, followed by a newline. 8 | 9 | Example: 10 | 11 | $> ./maff_alpha | cat -e 12 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 13 | -------------------------------------------------------------------------------- /level/2-5-ft_strrev/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_strrev 2 | Expected files : ft_strrev.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui inverse (en place) une chaîne de caractères. 7 | 8 | Elle devra renvoyer son paramètre. 9 | 10 | Votre fonction devra être prototypée de la façon suivante : 11 | 12 | char *ft_strrev(char *str); 13 | -------------------------------------------------------------------------------- /level/3-1-expand_str/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 2 | vous voyez c'est facile d'afficher la meme chose$ 3 | $> ./expand_str " seulement la c'est plus dur " | cat -e 4 | seulement la c'est plus dur$ 5 | $> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 6 | $ 7 | $> ./expand_str "" | cat -e 8 | $ 9 | $> 10 | -------------------------------------------------------------------------------- /Exam00/2-0-maff_alpha/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : maff_alpha 2 | Expected files : maff_alpha.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays the alphabet, with even letters in uppercase, and 7 | odd letters in lowercase, followed by a newline. 8 | 9 | Example: 10 | 11 | $> ./maff_alpha | cat -e 12 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 13 | -------------------------------------------------------------------------------- /level/0-0-maff_alpha/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : maff_alpha 2 | Expected files : maff_alpha.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche l'alphabet une lettre sur 2 en minuscule, et le 7 | reste en majuscule (Voir l'exemple), suivi d'un '\n'. 8 | 9 | Exemple: 10 | 11 | $> ./maff_alpha | cat -e 12 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 13 | -------------------------------------------------------------------------------- /Exam00/2-0-maff_alpha/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : maff_alpha 2 | Expected files : maff_alpha.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche l'alphabet une lettre sur 2 en minuscule, et le 7 | reste en majuscule (Voir l'exemple), suivi d'un '\n'. 8 | 9 | Exemple: 10 | 11 | $> ./maff_alpha | cat -e 12 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 13 | -------------------------------------------------------------------------------- /Exam02/1-0-ft_putstr/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_putstr 2 | Fisiere de iesire : ft_putstr.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce afiseaza un sir de caractere la iesirea standard. 7 | 8 | Pointerul catre functie este adresa primului caracter al sirului. 9 | 10 | Ea trebuie sa aiba prototipul urmator: 11 | 12 | void ft_putstr(char *str); 13 | -------------------------------------------------------------------------------- /level/1-2-ft_putstr/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_putstr 2 | Fisiere de iesire : ft_putstr.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce afiseaza un sir de caractere la iesirea standard. 7 | 8 | Pointerul catre functie este adresa primului caracter al sirului. 9 | 10 | Ea trebuie sa aiba prototipul urmator: 11 | 12 | void ft_putstr(char *str); 13 | -------------------------------------------------------------------------------- /level/3-4-str_capitalizer/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./str_capitalizer | cat -e 2 | $ 3 | $> ./str_capitalizer "Premier PETIT TesT" | cat -e 4 | Premier Petit Test$ 5 | $> ./str_capitalizer "DeuxiEmE tEST uN PEU moinS facile" " attention C'EST pas dur QUAND mEmE" "ALLer UN DeRNier 0123456789pour LA rouTE E " | cat -e 6 | Deuxieme Test Un Peu Moins Facile$ 7 | Attention C'est Pas Dur Quand Meme$ 8 | Aller Un Dernier 0123456789pour La Route E $ 9 | $> 10 | -------------------------------------------------------------------------------- /level/4-4-ft_itoa/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa 2 | Expected files : ft_itoa.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes an int and converts it to a null-terminated string. 7 | The function returns the result in a char array that you must allocate. 8 | 9 | Your function must be declared as follows: 10 | 11 | char *ft_itoa(int nbr); 12 | -------------------------------------------------------------------------------- /level/3-0-rstr_capitalizer/examples.txt: -------------------------------------------------------------------------------- 1 | $> ./rstr_capitalizer | cat -e 2 | $ 3 | $> ./rstr_capitalizer "Premier PETIT TesT" | cat -e 4 | premieR petiT tesT$ 5 | $> ./rstr_capitalizer "DeuxiEmE tEST uN PEU moinS facile" " attention C'EST pas dur QUAND mEmE" "ALLer UN DeRNier 0123456789pour LA rouTE E " | cat -e 6 | deuxiemE tesT uN peU moinS facilE$ 7 | attentioN c'esT paS duR quanD memE$ 8 | alleR uN dernieR 0123456789pouR lA routE E $ 9 | $> 10 | 11 | -------------------------------------------------------------------------------- /level/2-0-ft_atoi/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_atoi 2 | Expected files : ft_atoi.c 3 | Allowed functions: None 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui convertit une chaîne en un entier (type int) et le retourne. 7 | 8 | Marche comme la fonction standard atoi(const char *str), voir le man. 9 | 10 | La fonction doit être prototypée comme suit: 11 | 12 | int ft_atoi(const char *str); 13 | -------------------------------------------------------------------------------- /Exam00/4-0-ft_atoi/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_atoi 2 | Expected files : ft_atoi.c 3 | Allowed functions: None 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui convertit une chaîne en un entier (type int) et le retourne. 7 | 8 | Marche comme la fonction standard atoi(const char *str), voir le man. 9 | 10 | La fonction doit être prototypée comme suit: 11 | 12 | int ft_atoi(const char *str); 13 | -------------------------------------------------------------------------------- /Exam01/2-0-print_bits/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_bits 2 | Expected files : print_bits.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un octet et l'affiche en binaire, sans newline à la fin. 7 | 8 | Votre fonction doit étre déclarée comme suit: 9 | 10 | void print_bits(unsigned char octet); 11 | 12 | Exemple, si on lui passe 2, elle affiche "00000010" 13 | -------------------------------------------------------------------------------- /level/1-2-ft_putstr/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_putstr 2 | Expected files : ft_putstr.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that displays a string on the standard output. 7 | 8 | The pointer passed to the function contains the address of the string's first 9 | character. 10 | 11 | Your function must be declared as follows: 12 | 13 | void ft_putstr(char *str); 14 | -------------------------------------------------------------------------------- /level/2-4-print_bits/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_bits 2 | Expected files : print_bits.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un octet et l'affiche en binaire, sans newline à la fin. 7 | 8 | Votre fonction doit étre déclarée comme suit: 9 | 10 | void print_bits(unsigned char octet); 11 | 12 | Exemple, si on lui passe 2, elle affiche "00000010" 13 | -------------------------------------------------------------------------------- /Exam02/1-0-ft_putstr/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_putstr 2 | Expected files : ft_putstr.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that displays a string on the standard output. 7 | 8 | The pointer passed to the function contains the address of the string's first 9 | character. 10 | 11 | Your function must be declared as follows: 12 | 13 | void ft_putstr(char *str); 14 | -------------------------------------------------------------------------------- /Exam01/2-0-print_bits/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_bits 2 | Expected files : print_bits.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a byte, and prints it in binary WITHOUT A NEWLINE 7 | AT THE END. 8 | 9 | Your function must be declared as follows: 10 | 11 | void print_bits(unsigned char octet); 12 | 13 | Example, if you pass 2 to print_bits, it will print "00000010" 14 | -------------------------------------------------------------------------------- /Exam02/1-0-ft_putstr/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_putstr 2 | Expected files : ft_putstr.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui affiche une chaîne de caractères sur la sortie standard. 7 | 8 | Le pointeur passé à la fonction est l'adresse du premier caractère de la chaîne. 9 | 10 | Elle devra être prototypée de la façon suivante : 11 | 12 | void ft_putstr(char *str); 13 | -------------------------------------------------------------------------------- /level/1-2-ft_putstr/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_putstr 2 | Expected files : ft_putstr.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui affiche une chaîne de caractères sur la sortie standard. 7 | 8 | Le pointeur passé à la fonction est l'adresse du premier caractère de la chaîne. 9 | 10 | Elle devra être prototypée de la façon suivante : 11 | 12 | void ft_putstr(char *str); 13 | -------------------------------------------------------------------------------- /level/2-4-print_bits/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_bits 2 | Expected files : print_bits.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a byte, and prints it in binary WITHOUT A NEWLINE 7 | AT THE END. 8 | 9 | Your function must be declared as follows: 10 | 11 | void print_bits(unsigned char octet); 12 | 13 | Example, if you pass 2 to print_bits, it will print "00000010" 14 | -------------------------------------------------------------------------------- /level/4-4-ft_itoa/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa 2 | Expected files : ft_itoa.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un int et le convertit en chaîne terminée par un 7 | caractère nul. Cette fonction retourne le résultat en tant qu'un tableau de 8 | char que vous devez allouer. 9 | 10 | Votre fonction sera déclarée comme suit: 11 | 12 | char *ft_itoa(int nbr); 13 | -------------------------------------------------------------------------------- /level/4-4-ft_itoa/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa 2 | Expected files : ft_itoa.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste un int si il converteste intr-un sir de caractere, care se termina cu null. Functia returneaza resultatul intr-un vector de char pe care trebuie sa il alocati. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | char *ft_itoa(int nbr); 11 | -------------------------------------------------------------------------------- /Exam00/4-0-ft_atoi/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_atoi 2 | Expected files : ft_atoi.c 3 | Allowed functions: None 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that converts the string argument str to an integer (type int) 7 | and returns it. 8 | 9 | It works much like the standard atoi(const char *str) function, see the man. 10 | 11 | Your function must be declared as follows: 12 | 13 | int ft_atoi(const char *str); 14 | -------------------------------------------------------------------------------- /Exam01/2-0-print_bits/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_bits 2 | Expected files : print_bits.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste un byte si afiseaza byte-ul in binar FARA LINIE NOUA LA SFARSTI. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | void print_bits(unsigned char octet); 11 | 12 | Exemplu, daca trimiteti 2 functiei print_bits, va afisa "00000010" 13 | -------------------------------------------------------------------------------- /level/2-0-ft_atoi/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_atoi 2 | Expected files : ft_atoi.c 3 | Allowed functions: None 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that converts the string argument str to an integer (type int) 7 | and returns it. 8 | 9 | It works much like the standard atoi(const char *str) function, see the man. 10 | 11 | Your function must be declared as follows: 12 | 13 | int ft_atoi(const char *str); 14 | -------------------------------------------------------------------------------- /level/2-4-print_bits/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_bits 2 | Expected files : print_bits.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste un byte si afiseaza byte-ul in binar FARA LINIE NOUA LA SFARSTI. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | void print_bits(unsigned char octet); 11 | 12 | Exemplu, daca trimiteti 2 functiei print_bits, va afisa "00000010" 13 | -------------------------------------------------------------------------------- /Exam00/2-0-maff_alpha/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : maff_alpha 2 | Fisiere de iesire : maff_alpha.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce afiseaza alfabetul, din doua-in-doua litere cu caractere 7 | minuscule, iar celelalte (intermediare) vor fi afisate cu majuscule (Vezi exemplul), 8 | urmat de '\n'. 9 | 10 | Exemplu: 11 | 12 | $> ./maff_alpha | cat -e 13 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 14 | -------------------------------------------------------------------------------- /level/0-0-maff_alpha/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : maff_alpha 2 | Fisiere de iesire : maff_alpha.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce afiseaza alfabetul, din doua-in-doua litere cu caractere 7 | minuscule, iar celelalte (intermediare) vor fi afisate cu majuscule (Vezi exemplul), 8 | urmat de '\n'. 9 | 10 | Exemplu: 11 | 12 | $> ./maff_alpha | cat -e 13 | aBcDeFgHiJkLmNoPqRsTuVwXyZ$ 14 | -------------------------------------------------------------------------------- /level/4-1-sort_int_tab/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : sort_int_tab 2 | Expected files : sort_int_tab.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write the following function: 7 | 8 | void sort_int_tab(int *tab, unsigned int size); 9 | 10 | It must sort (in-place) the 'tab' int array, that contains exactly 'size' 11 | members, in ascending order. 12 | 13 | Doubles must be preserved. 14 | 15 | Input is always coherent. 16 | -------------------------------------------------------------------------------- /level/4-3-sort_int_tab/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : sort_int_tab 2 | Expected files : sort_int_tab.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write the following function: 7 | 8 | void sort_int_tab(int *tab, unsigned int size); 9 | 10 | It must sort (in-place) the 'tab' int array, that contains exactly 'size' 11 | members, in ascending order. 12 | 13 | Doubles must be preserved. 14 | 15 | Input is always coherent. 16 | -------------------------------------------------------------------------------- /level/2-1-max/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : max 2 | Expected files : max.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write the following function: 7 | 8 | int max(int* tab, unsigned int len); 9 | 10 | The first parameter is an array of int, the second is the number of elements in 11 | the array. 12 | 13 | The function returns the largest number found in the array. 14 | 15 | If the array is empty, the function returns 0. 16 | -------------------------------------------------------------------------------- /level/2-1-max/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : max 2 | Fisiere de iesire : max.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti functia urmatoare: 7 | 8 | int max(int* tab, unsigned int len); 9 | 10 | Primul parametru este un tablou de intregi, al doile este numarul de elemente 11 | continute in tablou. 12 | 13 | Functia trebuie sa returmeze cel mai mare numar gasit in tablou. 14 | 15 | Daca tabloul este vid, functia va returna 0. 16 | -------------------------------------------------------------------------------- /level/2-1-max/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : max 2 | Expected files : max.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire la fonction suivante: 7 | 8 | int max(int* tab, unsigned int len); 9 | 10 | Le premier paramètre est un tableau d'int, le deuxième est le nombre d'éléments 11 | contenus dans ce tableau. 12 | 13 | La fonction renvoie le plus grand nombre trouvé dans le tableau. 14 | 15 | Si le tableau est vide, la fonction renvoie 0. 16 | -------------------------------------------------------------------------------- /level/1-0-ulstr/examples.txt: -------------------------------------------------------------------------------- 1 | $>./ulstr "L'eSPrit nE peUt plUs pRogResSer s'Il staGne et sI peRsIsTent VAnIte et auto-justification." | cat -e 2 | l'EspRIT Ne PEuT PLuS PrOGrESsER S'iL STAgNE ET Si PErSiStENT vaNiTE ET AUTO-JUSTIFICATION.$ 3 | $>./ulstr "S'enTOuRer dE sECreT eSt uN sIGnE De mAnQuE De coNNaiSSanCe. " | cat -e 4 | s'ENtoUrER De SecREt EsT Un SigNe dE MaNqUe dE COnnAIssANcE. $ 5 | $>./ulstr "3:21 Ba tOut moUn ki Ka di KE m'en Ka fe fot" | cat -e 6 | 3:21 bA ToUT MOuN KI kA DI ke M'EN kA FE FOT$ 7 | $>./ulstr | cat -e 8 | $ 9 | -------------------------------------------------------------------------------- /level/3-4-paramsum/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : paramsum 2 | Expected files : paramsum.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays the number of arguments passed to it, followed by 7 | a newline. 8 | 9 | If there are no arguments, just display a 0 followed by a newline. 10 | 11 | Example: 12 | 13 | $>./paramsum 1 2 3 5 7 24 14 | 6 15 | $>./paramsum 6 12 24 | cat -e 16 | 3$ 17 | $>./paramsum | cat -e 18 | 0$ 19 | $> 20 | -------------------------------------------------------------------------------- /Exam02/2-0-swap_bits/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : swap_bits 2 | Expected files : swap_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a byte, swaps its halves (like the example) and 7 | returns the result. 8 | 9 | Your function must be declared as follows: 10 | 11 | unsigned char swap_bits(unsigned char octet); 12 | 13 | Example: 14 | 15 | 1 byte 16 | _____________ 17 | 0100 | 0001 18 | \ / 19 | / \ 20 | 0001 | 0100 21 | -------------------------------------------------------------------------------- /level/2-0-swap_bits/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : swap_bits 2 | Expected files : swap_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a byte, swaps its halves (like the example) and 7 | returns the result. 8 | 9 | Your function must be declared as follows: 10 | 11 | unsigned char swap_bits(unsigned char octet); 12 | 13 | Example: 14 | 15 | 1 byte 16 | _____________ 17 | 0100 | 0001 18 | \ / 19 | / \ 20 | 0001 | 0100 21 | -------------------------------------------------------------------------------- /Exam02/2-0-swap_bits/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : swap_bits 2 | Expected files : swap_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste un byte, inverseaza jumatatile (ca si in exemplu) si returneaza rezultatul. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | unsigned char swap_bits(unsigned char octet); 11 | 12 | Example: 13 | 14 | 1 byte 15 | _____________ 16 | 0100 | 0001 17 | \ / 18 | / \ 19 | 0001 | 0100 20 | -------------------------------------------------------------------------------- /level/2-0-swap_bits/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : swap_bits 2 | Expected files : swap_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste un byte, inverseaza jumatatile (ca si in exemplu) si returneaza rezultatul. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | unsigned char swap_bits(unsigned char octet); 11 | 12 | Example: 13 | 14 | 1 byte 15 | _____________ 16 | 0100 | 0001 17 | \ / 18 | / \ 19 | 0001 | 0100 20 | -------------------------------------------------------------------------------- /level/4-1-sort_int_tab/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : sort_int_tab 2 | Expected files : sort_int_tab.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire la fonction suivante: 7 | 8 | void sort_int_tab(int *tab, unsigned int size); 9 | 10 | Cette fonction doit trier (en place !) le tableau d'ints 'tab', qui contient 11 | exactement 'size' entrées, dans l'ordre croissant. 12 | 13 | Les doublons doivent être préservés. 14 | 15 | Les entrées seront toujours cohérentes. 16 | -------------------------------------------------------------------------------- /level/4-3-sort_int_tab/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : sort_int_tab 2 | Expected files : sort_int_tab.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire la fonction suivante: 7 | 8 | void sort_int_tab(int *tab, unsigned int size); 9 | 10 | Cette fonction doit trier (en place !) le tableau d'ints 'tab', qui contient 11 | exactement 'size' entrées, dans l'ordre croissant. 12 | 13 | Les doublons doivent être préservés. 14 | 15 | Les entrées seront toujours cohérentes. 16 | -------------------------------------------------------------------------------- /level/3-4-paramsum/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : paramsum 2 | Expected files : paramsum.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme paramsum qui affiche le nombre d'arguments passés en 7 | paramètre au programme, suivi d'un \n. 8 | 9 | Si aucun argument n'est passé, vous afficherez 0, suivi d'un \n. 10 | 11 | Exemple: 12 | 13 | $>./paramsum 1 2 3 5 7 24 14 | 6 15 | $>./paramsum 6 12 24 | cat -e 16 | 3$ 17 | $>./paramsum | cat -e 18 | 0$ 19 | $> 20 | -------------------------------------------------------------------------------- /Exam02/2-0-swap_bits/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : swap_bits 2 | Expected files : swap_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un octet, inverse ses moitiés (comme dans l'exemple), puis retourne le résultat. 7 | 8 | Votre fonction doit être déclarée comme suit: 9 | 10 | unsigned char swap_bits(unsigned char octet); 11 | 12 | Exemple: 13 | 14 | 1 byte 15 | _____________ 16 | 0100 | 0001 17 | \ / 18 | / \ 19 | 0001 | 0100 20 | -------------------------------------------------------------------------------- /level/2-0-reverse_bits/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : reverse_bits 2 | Expected files : reverse_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a byte, reverses it, bit by bit (like the 7 | example) and returns the result. 8 | 9 | Your function must be declared as follows: 10 | 11 | unsigned char reverse_bits(unsigned char octet); 12 | 13 | Example: 14 | 15 | 1 byte 16 | _____________ 17 | 0100 0001 18 | || 19 | \/ 20 | 1000 0010 21 | -------------------------------------------------------------------------------- /level/2-0-swap_bits/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : swap_bits 2 | Expected files : swap_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un octet, inverse ses moitiés (comme dans l'exemple), puis retourne le résultat. 7 | 8 | Votre fonction doit être déclarée comme suit: 9 | 10 | unsigned char swap_bits(unsigned char octet); 11 | 12 | Exemple: 13 | 14 | 1 byte 15 | _____________ 16 | 0100 | 0001 17 | \ / 18 | / \ 19 | 0001 | 0100 20 | -------------------------------------------------------------------------------- /level/3-4-paramsum/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : paramsum 2 | Fisiere de iesire : paramsum.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program paramsum care afiseaza numarul de argumente transmise ca 7 | parametru programului, urmat de '\n'. 8 | 9 | Daca niciun argument nu este transmis veti afisa 0, urmat de '\n'. 10 | 11 | Exemplu: 12 | 13 | $>./paramsum 1 2 3 5 7 24 14 | 6 15 | $>./paramsum 6 12 24 | cat -e 16 | 3$ 17 | $>./paramsum | cat -e 18 | 0$ 19 | $> 20 | -------------------------------------------------------------------------------- /level/1-0-rev_print/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rev_print 2 | Expected files : rev_print.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string, and displays the string in reverse 7 | followed by a newline. 8 | 9 | If the number of parameters is not 1, the program displays a newline. 10 | 11 | Examples: 12 | 13 | $> ./rev_print "zaz" | cat -e 14 | zaz$ 15 | $> ./rev_print "dub0 a POIL" | cat -e 16 | LIOP a 0bud$ 17 | $> ./rev_print | cat -e 18 | $ 19 | -------------------------------------------------------------------------------- /level/1-0-rev_print/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rev_print 2 | Expected files : rev_print.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne et l'affiche en ordre inverse suivie 7 | d'un newline. 8 | 9 | Si le nombre d'arguments n'est pas 1, le programme affiche un newline. 10 | 11 | Exemples: 12 | 13 | $> ./rev_print "zaz" | cat -e 14 | zaz$ 15 | $> ./rev_print "dub0 a POIL" | cat -e 16 | LIOP a 0bud$ 17 | $> ./rev_print | cat -e 18 | $ 19 | -------------------------------------------------------------------------------- /level/1-3-rev_print/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rev_print 2 | Expected files : rev_print.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string, and displays the string in reverse 7 | followed by a newline. 8 | 9 | If the number of parameters is not 1, the program displays a newline. 10 | 11 | Examples: 12 | 13 | $> ./rev_print "zaz" | cat -e 14 | zaz$ 15 | $> ./rev_print "dub0 a POIL" | cat -e 16 | LIOP a 0bud$ 17 | $> ./rev_print | cat -e 18 | $ 19 | -------------------------------------------------------------------------------- /level/1-3-rev_print/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rev_print 2 | Expected files : rev_print.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne et l'affiche en ordre inverse suivie 7 | d'un newline. 8 | 9 | Si le nombre d'arguments n'est pas 1, le programme affiche un newline. 10 | 11 | Exemples: 12 | 13 | $> ./rev_print "zaz" | cat -e 14 | zaz$ 15 | $> ./rev_print "dub0 a POIL" | cat -e 16 | LIOP a 0bud$ 17 | $> ./rev_print | cat -e 18 | $ 19 | -------------------------------------------------------------------------------- /level/4-0-ft_split/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_split 2 | Expected files : ft_split.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a string, splits it into words, and returns them as 7 | a NULL-terminated array of strings. 8 | 9 | A "word" is defined as a part of a string delimited either by spaces/tabs/new 10 | lines, or by the start/end of the string. 11 | 12 | Your function must be declared as follows: 13 | 14 | char **ft_split(char *str); 15 | -------------------------------------------------------------------------------- /ExamFinal/result.txt: -------------------------------------------------------------------------------- 1 | Start time: 26/09/2015 08:00:30 UTC 2 | End time: 26/09/2015 12:42:54 UTC 3 | Mode: real 4 | Final grade: 45/100 5 | 6 | Assignments: 7 | Level 5: 8 | 2: print_memory for 0 potential points (Failure) 9 | 1: ft_itoa_base for 4 potential points (Failure) 10 | 0: brainfuck for 9 potential points (Failure) 11 | 0: fprime for 9 potential points (Success) 12 | 0: pgcd for 9 potential points (Success) 13 | 0: last_word for 9 potential points (Success) 14 | 0: search_and_replace for 9 potential points (Success) 15 | 0: hello for 9 potential points (Success) -------------------------------------------------------------------------------- /level/1-0-rev_print/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : rev_print 2 | Fisiere de iesire : rev_print.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care primeste un sir de caractere si afiseaza sirul de 7 | caractere inversat, urmat de '\n'. 8 | Daca numarul parametrilor e diferit de 1, programul afiseaza '\n'. 9 | 10 | Exemple: 11 | 12 | $> ./rev_print "zaz" | cat -e 13 | zaz$ 14 | $> ./rev_print "dub0 a POIL" | cat -e 15 | LIOP a 0bud$ 16 | $> ./rev_print | cat -e 17 | $ 18 | -------------------------------------------------------------------------------- /level/1-3-rev_print/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : rev_print 2 | Fisiere de iesire : rev_print.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care primeste un sir de caractere si afiseaza sirul de 7 | caractere inversat, urmat de '\n'. 8 | Daca numarul parametrilor e diferit de 1, programul afiseaza '\n'. 9 | 10 | Exemple: 11 | 12 | $> ./rev_print "zaz" | cat -e 13 | zaz$ 14 | $> ./rev_print "dub0 a POIL" | cat -e 15 | LIOP a 0bud$ 16 | $> ./rev_print | cat -e 17 | $ 18 | -------------------------------------------------------------------------------- /level/2-0-reverse_bits/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : reverse_bits 2 | Expected files : reverse_bits.c 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un octet, l'inverse bit à bit (comme dans 7 | l'exemple) et retourne le résultat. 8 | 9 | Votre fonction doit être déclarée comme suit: 10 | 11 | unsigned char reverse_bits(unsigned char octet); 12 | 13 | Exemple: 14 | 15 | 1 byte 16 | _____________ 17 | 0100 0001 18 | || 19 | \/ 20 | 1000 0010 21 | -------------------------------------------------------------------------------- /level/4-1-sort_int_tab/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : sort_int_tab 2 | Fisiere de iesire : sort_int_tab.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti functia urmatoare: 7 | 8 | void sort_int_tab(int *tab, unsigned int size); 9 | 10 | Aceasta functie trebuie sa sorteze (pe loc!) tabloul de intregi tab, care contine 11 | exact un numar size de elemente de intrare, in ordine crescatoare. 12 | 13 | Dublurile trebuie pastrate. 14 | 15 | Valorile de intrare vor fi intotdeauna coerente. 16 | -------------------------------------------------------------------------------- /level/4-3-sort_int_tab/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : sort_int_tab 2 | Fisiere de iesire : sort_int_tab.c 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti functia urmatoare: 7 | 8 | void sort_int_tab(int *tab, unsigned int size); 9 | 10 | Aceasta functie trebuie sa sorteze (pe loc!) tabloul de intregi tab, care contine 11 | exact un numar size de elemente de intrare, in ordine crescatoare. 12 | 13 | Dublurile trebuie pastrate. 14 | 15 | Valorile de intrare vor fi intotdeauna coerente. 16 | -------------------------------------------------------------------------------- /level/0-1-aff_last_param/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : aff_last_param 2 | Expected files : aff_last_param.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend des chaînes, et affiche son dernier argument suivi d'un newline. 7 | 8 | S'il y a moins d'un argument, le programme affiche juste un newline. 9 | 10 | Exemples: 11 | 12 | $> ./aff_last_param "zaz" "mange" "des" "chats" | cat -e 13 | chats$ 14 | $> ./aff_last_param "j'aime le savon" | cat -e 15 | j'aime le savon$ 16 | $> ./aff_last_param 17 | $ 18 | -------------------------------------------------------------------------------- /level/0-1-aff_last_param/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : aff_last_param 2 | Expected files : aff_last_param.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes strings as arguments, and displays its last 7 | argument followed by a newline. 8 | 9 | If the number of arguments is less than 1, the program displays a newline. 10 | 11 | Examples: 12 | 13 | $> ./aff_last_param "zaz" "mange" "des" "chats" | cat -e 14 | chats$ 15 | $> ./aff_last_param "j'aime le savon" | cat -e 16 | j'aime le savon$ 17 | $> ./aff_last_param 18 | $ 19 | -------------------------------------------------------------------------------- /level/4-0-ft_split/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_split 2 | Fisier de iesire : ft_split.c 3 | Functii autorizate : malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce ia ca parametru un sir de caractere si pe care il separa 7 | in cuvinte, ce vor fi returnate sub forma unui tablou siruri terminate cu NULL. 8 | 9 | Numim "cuvant" o portiune a a sirului de caractere delimitate de fie de spatii 10 | si/sau tabulatoare, fie de inceputul/sfarsitul sirului. 11 | 12 | Functia va trebui sa aiba urmatorul prototip: 13 | 14 | char **ft_split(char *str); 15 | 16 | -------------------------------------------------------------------------------- /level/0-1-aff_last_param/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : aff_last_param 2 | Fisiere de iesire : aff_last_param.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru siruri de caractere si care afiseaza 7 | ultimul parametru urmat de un '\n'. 8 | 9 | Daca numarul de parametri este mai mic de 1, probramul afiseaza '\n'. 10 | 11 | Example: 12 | 13 | $> ./aff_last_param "zaz" "mange" "des" "chats" | cat -e 14 | chats$ 15 | $> ./aff_last_param "j'aime le savon" | cat -e 16 | j'aime le savon$ 17 | $> ./aff_last_param 18 | $ 19 | -------------------------------------------------------------------------------- /level/3-0-print_hex/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : print_hex 2 | Fisiere de iesire : print_hex.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care primeste un numar (baza 10) mai mare ca -1 ca sir de 7 | caractere si afiseaza numarul in hexazecimal (baza 16) urmat de un '\n'. 8 | Daca numarul parametrilor nu e 1, programul afiseaza '\n'. 9 | 10 | Example: 11 | 12 | $> ./print_hex "10" | cat -e 13 | A$ 14 | $> ./print_hex "255" | cat -e 15 | FF$ 16 | $> ./print_hex "5156454" | cat -e 17 | 4EAE66$ 18 | $> ./print_hex | cat -e 19 | $ 20 | -------------------------------------------------------------------------------- /level/3-0-print_hex/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_hex 2 | Expected files : print_hex.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend un entier positif ou nul exprimé en base 10, et l'affiche en base 16 (avec des minuscules) suivi d'un newline. 7 | 8 | Si le nombre de paramêtres n'est pas 1, le programme affiche un newline. 9 | 10 | Exemples: 11 | 12 | $> ./print_hex "10" | cat -e 13 | a$ 14 | $> ./print_hex "255" | cat -e 15 | ff$ 16 | $> ./print_hex "5156454" | cat -e 17 | 4eae66$ 18 | $> ./print_hex | cat -e 19 | $ 20 | -------------------------------------------------------------------------------- /Exam02/result.txt: -------------------------------------------------------------------------------- 1 | Start time: 18/09/2015 15:01:36 UTC 2 | End time: 18/09/2015 18:47:27 UTC 3 | Mode: real 4 | Final grade: 75/100 5 | 6 | Assignments: 7 | Level 5: 8 | 2: print_memory for 10 potential points (Failure) 9 | 1: brainfuck for 15 potential points (Failure) 10 | 0: ft_itoa_base for 20 potential points (Failure) 11 | 0: ft_list_remove_if for 16 potential points (Success) 12 | 0: add_prime_sum for 16 potential points (Success) 13 | 1: last_word for 11 potential points (Success) 14 | 0: swap_bits for 16 potential points (Failure) 15 | 0: ft_putstr for 16 potential points (Success) 16 | 0: ft_countdown for 16 potential points (Success) -------------------------------------------------------------------------------- /level/3-0-ft_list_size/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_size 2 | Expected files : ft_list_size.c, ft_list.h 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that returns the number of elements in the linked list that's 7 | passed to it. 8 | 9 | It must be declared as follows: 10 | 11 | int ft_list_size(t_list *begin_list); 12 | 13 | You must use the following structure, and turn it in as a file called 14 | ft_list.h: 15 | 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | -------------------------------------------------------------------------------- /level/3-0-print_hex/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_hex 2 | Expected files : print_hex.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a positive (or zero) number expressed in base 10, 7 | and displays it in base 16 (lowercase letters) followed by a newline. 8 | 9 | If the number of parameters is not 1, the program displays a newline. 10 | 11 | Examples: 12 | 13 | $> ./print_hex "10" | cat -e 14 | a$ 15 | $> ./print_hex "255" | cat -e 16 | ff$ 17 | $> ./print_hex "5156454" | cat -e 18 | 4eae66$ 19 | $> ./print_hex | cat -e 20 | $ 21 | -------------------------------------------------------------------------------- /level/3-0-ft_list_size/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_size 2 | Expected files : ft_list_size.c, ft_list.h 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui renvoie le nombre d'éléments dans la liste chaînée 7 | passée en paramètre. 8 | 9 | Elle devra être prototypée de la façon suivante: 10 | 11 | int ft_list_size(t_list *begin_list); 12 | 13 | Vous devez utiliser la structure suivante, et la rendre dans un fichier 14 | ft_list.h: 15 | 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | -------------------------------------------------------------------------------- /Exam00/result.txt: -------------------------------------------------------------------------------- 1 | Start time: 04/09/2015 15:04:06 UTC 2 | End time: 04/09/2015 17:21:42 UTC 3 | Mode: real 4 | Final grade: 60/100 5 | 6 | Assignments: 7 | Level 0: 8 | 0: only_z for 20 potential points (Success) 9 | Level 1: 10 | 0: ft_print_numbers for 20 potential points (Failure) 11 | 1: hello for 15 potential points (Failure) 12 | 2: ft_countdown for 10 potential points (Success) 13 | Level 2: 14 | 0: maff_alpha for 20 potential points (Success) 15 | Level 3: 16 | 0: ft_strrev for 20 potential points (Failure) 17 | 1: ft_strcpy for 15 potential points (Failure) 18 | 2: ft_swap for 10 potential points (Success) 19 | Level 4: 20 | 0: ft_atoi for 20 potential points (Failure) -------------------------------------------------------------------------------- /level/3-0-ft_list_size/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_list_size 2 | Fisiere de iesire : ft_list_size.c, ft_list.h 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care returneaza numarul de elemente dintr-o lista inlantuita, 7 | transmisa ca parametru. 8 | 9 | Ea trebuie sa aiba prototipul urmator: 10 | 11 | int ft_list_size(t_list *begin_list); 12 | 13 | Trebuie sa utilizati structura urmatoare, pe care sa o predati/livrati intr-un 14 | fisier ft_list.h: 15 | 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | -------------------------------------------------------------------------------- /level/4-0-ft_split/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_split 2 | Expected files : ft_split.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend en paramètre une chaîne de caractères et la 7 | découpe en mots, qui seront retournés sous la forme d'un tableau de chaînes 8 | terminé par NULL. 9 | 10 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 11 | espaces, des retours à la ligne et/ou des tabulations, soit par le début / fin 12 | de la chaîne. 13 | 14 | Votre fonction devra être prototypée de la façon suivante : 15 | 16 | char **ft_split(char *str); 17 | -------------------------------------------------------------------------------- /level/0-0-aff_a/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : aff_a 2 | Expected files : aff_a.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string, and displays the first 'a' character it 7 | encounters in it, followed by a newline. If there are no 'a' characters in the 8 | string, the program just writes a newline. If the number of parameters is not 9 | 1, the program displays 'a' followed by a newline. 10 | 11 | Example: 12 | 13 | $> ./aff_a "abc" | cat -e 14 | a$ 15 | $> ./aff_a "dubO a POIL" | cat -e 16 | a$ 17 | $> ./aff_a "zz sent le poney" | cat -e 18 | $ 19 | $> ./aff_a | cat -e 20 | a$ 21 | -------------------------------------------------------------------------------- /Exam02/3-0-add_prime_sum/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : add_prime_sum 2 | Expected files : add_prime_sum.c 3 | Allowed functions: write, exit 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a positive integer as argument and displays the sum 7 | of all prime numbers inferior or equal to it followed by a newline. 8 | 9 | If the number of arguments is not 1, or the argument is not a positive number, 10 | just display 0 followed by a newline. 11 | 12 | Yes, the examples are right. 13 | 14 | Examples: 15 | 16 | $>./add_prime_sum 5 17 | 10 18 | $>./add_prime_sum 7 | cat -e 19 | 17$ 20 | $>./add_prime_sum | cat -e 21 | 0$ 22 | $> 23 | -------------------------------------------------------------------------------- /Exam02/3-0-add_prime_sum/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : add_prime_sum 2 | Expected files : add_prime_sum.c 3 | Allowed functions: write, exit 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend un entier positif en argument et affiche la somme 7 | de tous les nombres premiers inférieurs ou égaux à ce paramètre, suivie d'un 8 | \n. 9 | 10 | Si le nombre d'arguments n'est pas 1, ou que l'argument n'est pas positif, 11 | afficher 0 et un \n. 12 | 13 | Oui, les exemples sont justes. 14 | 15 | Exemples: 16 | 17 | $>./add_prime_sum 5 18 | 10 19 | $>./add_prime_sum 7 | cat -e 20 | 17$ 21 | $>./add_prime_sum | cat -e 22 | 0$ 23 | $> 24 | -------------------------------------------------------------------------------- /level/3-0-add_prime_sum/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : add_prime_sum 2 | Expected files : add_prime_sum.c 3 | Allowed functions: write, exit 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a positive integer as argument and displays the sum 7 | of all prime numbers inferior or equal to it followed by a newline. 8 | 9 | If the number of arguments is not 1, or the argument is not a positive number, 10 | just display 0 followed by a newline. 11 | 12 | Yes, the examples are right. 13 | 14 | Examples: 15 | 16 | $>./add_prime_sum 5 17 | 10 18 | $>./add_prime_sum 7 | cat -e 19 | 17$ 20 | $>./add_prime_sum | cat -e 21 | 0$ 22 | $> 23 | -------------------------------------------------------------------------------- /level/3-0-add_prime_sum/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : add_prime_sum 2 | Expected files : add_prime_sum.c 3 | Allowed functions: write, exit 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend un entier positif en argument et affiche la somme 7 | de tous les nombres premiers inférieurs ou égaux à ce paramètre, suivie d'un 8 | \n. 9 | 10 | Si le nombre d'arguments n'est pas 1, ou que l'argument n'est pas positif, 11 | afficher 0 et un \n. 12 | 13 | Oui, les exemples sont justes. 14 | 15 | Exemples: 16 | 17 | $>./add_prime_sum 5 18 | 10 19 | $>./add_prime_sum 7 | cat -e 20 | 17$ 21 | $>./add_prime_sum | cat -e 22 | 0$ 23 | $> 24 | -------------------------------------------------------------------------------- /Exam02/3-0-add_prime_sum/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : add_prime_sum 2 | Fisere de iesire : add_prime_sum.c 3 | Functii autorizate: write, exit 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care primeste un numar intreg pozitiv ca si parametru si care afiseaza suma tuturor numerelor prime mai mici sau egale decat parametrul primit, urmata de un terminator de linie. 7 | 8 | Dana numarul de argumente nu este 1, sau argumentul nu este un numar pozitiv, afisati doar 0 urmat de terminatorul de linie. 9 | 10 | Exemple: 11 | 12 | $>./add_prime_sum 5 13 | 10 14 | $>./add_prime_sum 7 | cat -e 15 | 17$ 16 | $>./add_prime_sum | cat -e 17 | 0$ 18 | $> 19 | -------------------------------------------------------------------------------- /level/0-0-aff_a/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : aff_a 2 | Expected files : aff_a.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne de caractères et affiche le premier 7 | caractère 'a' qu'il y rencontre, suivi d'un newline. S'il n'y a pas de 8 | caractère 'a' dans la chaîne, le programme affiche juste un newline. Si le 9 | nombre de paramètres n'est pas 1, le programme affiche 'a' suivi d'un newline. 10 | 11 | Exemple: 12 | 13 | $> ./aff_a "abc" | cat -e 14 | a$ 15 | $> ./aff_a "dubO a POIL" | cat -e 16 | a$ 17 | $> ./aff_a "zz sent le poney" | cat -e 18 | $ 19 | $> ./aff_a | cat -e 20 | a$ 21 | -------------------------------------------------------------------------------- /level/0-0-aff_a/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : aff_a 2 | Fisiere de iesire : aff_a.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere, si care afiseaza la 7 | iesirea standard primul caracter 'a' intalnit in acest sir, urmat de '\n'. Daca 8 | nu este intalnit niciun caracter 'a', programul va afisa '\n'. Daca numarul de 9 | parametri este diferit de 1, programul va afisa 'a' urmat de '\n'. 10 | 11 | Example: 12 | 13 | $> ./aff_a "abc" | cat -e 14 | a$ 15 | $> ./aff_a "dubO a POIL" | cat -e 16 | a$ 17 | $> ./aff_a "zz sent le poney" | cat -e 18 | $ 19 | $> ./aff_a | cat -e 20 | a$ 21 | -------------------------------------------------------------------------------- /level/3-0-add_prime_sum/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : add_prime_sum 2 | Fisere de iesire : add_prime_sum.c 3 | Functii autorizate: write, exit 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care primeste un numar intreg pozitiv ca si parametru si care afiseaza suma tuturor numerelor prime mai mici sau egale decat parametrul primit, urmata de un terminator de linie. 7 | 8 | Dana numarul de argumente nu este 1, sau argumentul nu este un numar pozitiv, afisati doar 0 urmat de terminatorul de linie. 9 | 10 | Exemple: 11 | 12 | $>./add_prime_sum 5 13 | 10 14 | $>./add_prime_sum 7 | cat -e 15 | 17$ 16 | $>./add_prime_sum | cat -e 17 | 0$ 18 | $> 19 | -------------------------------------------------------------------------------- /level/0-2-aff_z/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : aff_z 2 | Expected files : aff_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string, and displays the first 'z' 7 | character it encounters in it, followed by a newline. If there are no 8 | 'z' characters in the string, the program writes 'z' followed 9 | by a newline. If the number of parameters is not 1, the program displays 10 | 'z' followed by a newline. 11 | 12 | Example: 13 | 14 | $> ./aff_z "abc" | cat -e 15 | z$ 16 | $> ./aff_z "dubO a POIL" | cat -e 17 | z$ 18 | $> ./aff_z "zaz sent le poney" | cat -e 19 | z$ 20 | $> ./aff_z | cat -e 21 | z$ 22 | -------------------------------------------------------------------------------- /level/0-2-aff_z/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : aff_z 2 | Fisiere de iesire : aff_z.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | Scrieti un program ce ia ca parametru un sir de caractere, si care afiseaza la 6 | iesirea standard primul caracter 'z' intalnit in acest sir, urmat de '\n'. Daca 7 | nu este intalnit niciun caracter 'z', programul va afisa 'z' urmat de '\n'. Daca 8 | numarul de parametri este diferit de 1, programul va afisa 'z' urmat de '\n'. 9 | 10 | Example: 11 | 12 | $> ./aff_z "abc" | cat -e 13 | z$ 14 | $> ./aff_z "dubO a POIL" | cat -e 15 | z$ 16 | $> ./aff_z "zaz sent le poney" | cat -e 17 | z$ 18 | $> ./aff_z | cat -e 19 | z$ 20 | -------------------------------------------------------------------------------- /level/3-0-pgcd/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : pgcd 2 | Expected files : pgcd.c 3 | Allowed functions: printf, atoi, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes two strings representing two strictly positive 7 | integers that fit in an int. 8 | 9 | Display their highest common denominator followed by a newline (It's always a 10 | strictly positive integer). 11 | 12 | If the number of parameters is not 2, display a newline. 13 | 14 | Examples: 15 | 16 | $> ./pgcd 42 10 | cat -e 17 | 2$ 18 | $> ./pgcd 42 12 | cat -e 19 | 6$ 20 | $> ./pgcd 14 77 | cat -e 21 | 7$ 22 | $> ./pgcd 17 3 | cat -e 23 | 1$ 24 | $> ./pgcd | cat -e 25 | $ 26 | -------------------------------------------------------------------------------- /ExamFinal/3-0-pgcd/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : pgcd 2 | Expected files : pgcd.c 3 | Allowed functions: printf, atoi, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes two strings representing two strictly positive 7 | integers that fit in an int. 8 | 9 | Display their highest common denominator followed by a newline (It's always a 10 | strictly positive integer). 11 | 12 | If the number of parameters is not 2, display a newline. 13 | 14 | Examples: 15 | 16 | $> ./pgcd 42 10 | cat -e 17 | 2$ 18 | $> ./pgcd 42 12 | cat -e 19 | 6$ 20 | $> ./pgcd 14 77 | cat -e 21 | 7$ 22 | $> ./pgcd 17 3 | cat -e 23 | 1$ 24 | $> ./pgcd | cat -e 25 | $ 26 | -------------------------------------------------------------------------------- /Exam02/4-0-ft_list_remove_if/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_list_remove_if 2 | Fisiere de iesire : ft_list_remove_if.c 3 | Functii autorizate : free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ft_list_remove_if ce sterge dintr-o lista toate elementele 7 | ale caror data este "egala" cu data de referinta. 8 | 9 | Ea trebuie sa aiba prototipul urmator: 10 | 11 | void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); 12 | 13 | La corectare veti dispumne de un fisier ft_list.h astfel incat: 14 | 15 | $>cat ft_list.h 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | $> 22 | -------------------------------------------------------------------------------- /level/4-2-ft_list_remove_if/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_list_remove_if 2 | Fisiere de iesire : ft_list_remove_if.c 3 | Functii autorizate : free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ft_list_remove_if ce sterge dintr-o lista toate elementele 7 | ale caror data este "egala" cu data de referinta. 8 | 9 | Ea trebuie sa aiba prototipul urmator: 10 | 11 | void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); 12 | 13 | La corectare veti dispumne de un fisier ft_list.h astfel incat: 14 | 15 | $>cat ft_list.h 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | $> 22 | -------------------------------------------------------------------------------- /level/4-2-ft_list_remove_if/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_remove_if 2 | Expected files : ft_list_remove_if.c 3 | Allowed functions: free 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction ft_list_remove_if qui efface de la liste tous les élements 7 | dont la donnée est "égale" à la donnée de référence. 8 | 9 | Elle devra être prototypée de la façon suivante : 10 | 11 | void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); 12 | 13 | À la correction, vous disposez du fichier ft_list.h tel que : 14 | 15 | $>cat ft_list.h 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | $> 22 | -------------------------------------------------------------------------------- /Exam02/4-0-ft_list_remove_if/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_remove_if 2 | Expected files : ft_list_remove_if.c 3 | Allowed functions: free 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction ft_list_remove_if qui efface de la liste tous les élements 7 | dont la donnée est "égale" à la donnée de référence. 8 | 9 | Elle devra être prototypée de la façon suivante : 10 | 11 | void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); 12 | 13 | À la correction, vous disposez du fichier ft_list.h tel que : 14 | 15 | $>cat ft_list.h 16 | typedef struct s_list 17 | { 18 | struct s_list *next; 19 | void *data; 20 | } t_list; 21 | $> 22 | -------------------------------------------------------------------------------- /level/0-2-aff_z/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : aff_z 2 | Expected files : aff_z.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend en paramètre une chaîne de caractères, et qui 7 | affiche sur la sortie standard le premier caractère 'z' rencontré dans 8 | cette chaîne, suivi de '\n'. Si aucun 'z' 9 | n'est rencontré dans la chaîne, le programme affiche 'z' suivi de 10 | '\n'. Si le nombre de paramètres est différent de 1, le 11 | programme affiche 'z' suivi de '\n'. 12 | 13 | Exemple: 14 | 15 | $> ./aff_z "abc" | cat -e 16 | z$ 17 | $> ./aff_z "dubO a POIL" | cat -e 18 | z$ 19 | $> ./aff_z "zaz sent le poney" | cat -e 20 | z$ 21 | $> ./aff_z | cat -e 22 | z$ 23 | -------------------------------------------------------------------------------- /level/2-0-inter/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : inter 2 | Expected files : inter.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes two strings and displays, without doubles, the 7 | characters that appear in both strings, in the order they appear in the first 8 | one. 9 | 10 | The display will be followed by a \n. 11 | 12 | If the number of arguments is not 2, the program displays \n. 13 | 14 | Examples: 15 | 16 | $>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 17 | padinto$ 18 | $>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 19 | df6ewg4$ 20 | $>./inter "rien" "cette phrase ne cache rien" | cat -e 21 | rien$ 22 | $>./inter | cat -e 23 | $ 24 | -------------------------------------------------------------------------------- /level/4-0-ft_list_foreach/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_foreach 2 | Expected files : ft_list_foreach.c, ft_list.h 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a list and a function pointer, and applies this 7 | function to each element of the list. 8 | 9 | It must be declared as follows: 10 | 11 | void ft_list_foreach(t_list *begin_list, void (*f)(void *)); 12 | 13 | The function pointed to by f will be used as follows: 14 | 15 | (*f)(list_ptr->data); 16 | 17 | You must use the following structure, and turn it in as a file called 18 | ft_list.h: 19 | 20 | typedef struct s_list 21 | { 22 | struct s_list *next; 23 | void *data; 24 | } t_list; 25 | -------------------------------------------------------------------------------- /level/4-4-ft_list_foreach/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_foreach 2 | Expected files : ft_list_foreach.c, ft_list.h 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes a list and a function pointer, and applies this 7 | function to each element of the list. 8 | 9 | It must be declared as follows: 10 | 11 | void ft_list_foreach(t_list *begin_list, void (*f)(void *)); 12 | 13 | The function pointed to by f will be used as follows: 14 | 15 | (*f)(list_ptr->data); 16 | 17 | You must use the following structure, and turn it in as a file called 18 | ft_list.h: 19 | 20 | typedef struct s_list 21 | { 22 | struct s_list *next; 23 | void *data; 24 | } t_list; 25 | -------------------------------------------------------------------------------- /level/2-0-inter/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : inter 2 | Fisiere de iesire : inter.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru doua siruri de caractere si care afiseaza 7 | caracterele comune celor doua siruri, fara a le dubla. 8 | 9 | Afisarea se va face in ordinea aparitiei din primul sir, urmata de '\n'. 10 | 11 | Daca numarul ed parametri transmis este diferit de 2, programul va afisa '\n'. 12 | 13 | Exemple: 14 | 15 | $>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 16 | padinto$ 17 | $>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 18 | df6ewg4$ 19 | $>./inter "rien" "cette phrase ne cache rien" | cat -e 20 | rien$ 21 | $>./inter | cat -e 22 | $ 23 | -------------------------------------------------------------------------------- /level/2-1-alpha_mirror/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : alpha_mirror 2 | Expected files : alpha_mirror.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme alpha_mirror qui prend une chaîne et l'affiche après en avoir remplacé chaque 7 | caractère alphabétique par le caractère alphabétique opposé, suivie d'un newline. 8 | 9 | 'a' devient 'z', 'Z' devient 'A' 10 | 'd' devient 'w', 'M' devient 'N' 11 | 12 | Etc... 13 | 14 | La casse n'est pas changée. 15 | 16 | Si le nombre d'arguments n'est pas 1, affiche juste un newline. 17 | 18 | Exemples: 19 | 20 | $>./alpha_mirror "abc" 21 | zyx 22 | $>./alpha_mirror "My horse is Amazing." | cat -e 23 | Nb slihv rh Znzarmt.$ 24 | $>./alpha_mirror | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /level/2-1-alpha_mirror/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : alpha_mirror 2 | Expected files : alpha_mirror.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program called alpha_mirror that takes a string and displays this string 7 | after replacing each alphabetical character by the opposite alphabetical 8 | character, followed by a newline. 9 | 10 | 'a' becomes 'z', 'Z' becomes 'A' 11 | 'd' becomes 'w', 'M' becomes 'N' 12 | 13 | and so on. 14 | 15 | Case is not changed. 16 | 17 | If the number of arguments is not 1, display only a newline. 18 | 19 | Examples: 20 | 21 | $>./alpha_mirror "abc" 22 | zyx 23 | $>./alpha_mirror "My horse is Amazing." | cat -e 24 | Nb slihv rh Znzarmt.$ 25 | $>./alpha_mirror | cat -e 26 | $ 27 | $> 28 | -------------------------------------------------------------------------------- /level/3-0-ft_rrange/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_rrange 2 | Expected files : ft_rrange.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write the following function: 7 | 8 | int *ft_rrange(int start, int end); 9 | 10 | It must allocate (with malloc()) an array of integers, fill it with consecutive 11 | values that begin at end and end at start (Including start and end !), then 12 | return a pointer to the first value of the array. 13 | 14 | Examples: 15 | 16 | - With (1, 3) you will return an array containing 3, 2 and 1 17 | - With (-1, 2) you will return an array containing 2, 1, 0 and -1. 18 | - With (0, 0) you will return an array containing 0. 19 | - With (0, -3) you will return an array containing -3, -2, -1 and 0. 20 | -------------------------------------------------------------------------------- /level/3-3-ft_range/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_range 2 | Expected files : ft_range.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write the following function: 7 | 8 | int *ft_range(int start, int end); 9 | 10 | It must allocate (with malloc()) an array of integers, fill it with consecutive 11 | values that begin at start and end at end (Including start and end !), then 12 | return a pointer to the first value of the array. 13 | 14 | Examples: 15 | 16 | - With (1, 3) you will return an array containing 1, 2 and 3. 17 | - With (-1, 2) you will return an array containing -1, 0, 1 and 2. 18 | - With (0, 0) you will return an array containing 0. 19 | - With (0, -3) you will return an array containing 0, -1, -2 and -3. 20 | -------------------------------------------------------------------------------- /level/3-0-pgcd/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : pgcd 2 | Fisiere de iesire : pgcd.c 3 | Functii autorizate : printf, atoi, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru doua siruri de caractere reprezentand 7 | niste intregi, positivi ne nuli. 8 | 9 | Intregii luati ca parametri vor fi de tip int. 10 | 11 | Afisati cel mai mare divizor comun al acestor numere, urmat de '\n'. CMMDC este 12 | intotdeauna un intreg pozitiv, ne-nul. 13 | 14 | Daca numarul de parametri este diferit de 2, programul va afisa doar '\n'. 15 | 16 | Exemplu: 17 | 18 | $> ./pgcd 42 10 | cat -e 19 | 2$ 20 | $> ./pgcd 42 12 | cat -e 21 | 6$ 22 | $> ./pgcd 14 77 | cat -e 23 | 7$ 24 | $> ./pgcd 17 3 | cat -e 25 | 1$ 26 | $> ./pgcd | cat -e 27 | $ 28 | -------------------------------------------------------------------------------- /Exam02/2-1-last_word/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : last_word 2 | Expected files : last_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays its last word followed by a \n. 7 | 8 | A word is a section of string delimited by spaces/tabs or by the start/end of 9 | the string. 10 | 11 | If the number of parameters is not 1, or there are no words, display a newline. 12 | 13 | Example: 14 | 15 | $> ./last_word "FOR PONY" | cat -e 16 | PONY$ 17 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 18 | not$ 19 | $> ./last_word " " | cat -e 20 | $ 21 | $> ./last_word "a" "b" | cat -e 22 | $ 23 | $> ./last_word " lorem,ipsum " | cat -e 24 | lorem,ipsum$ 25 | $> 26 | -------------------------------------------------------------------------------- /Exam02/4-0-ft_list_remove_if/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_remove_if 2 | Expected files : ft_list_remove_if.c 3 | Allowed functions: free 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function called ft_list_remove_if that removes from the 7 | passed list any element the data of which is "equal" to the reference data. 8 | 9 | It will be declared as follows : 10 | 11 | void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); 12 | 13 | cmp takes two void* and returns 0 when both parameters are equal. 14 | 15 | You have to use the ft_list.h file, which will contain: 16 | 17 | $>cat ft_list.h 18 | typedef struct s_list 19 | { 20 | struct s_list *next; 21 | void *data; 22 | } t_list; 23 | $> 24 | -------------------------------------------------------------------------------- /ExamFinal/3-0-pgcd/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : pgcd 2 | Fisiere de iesire : pgcd.c 3 | Functii autorizate : printf, atoi, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru doua siruri de caractere reprezentand 7 | niste intregi, positivi ne nuli. 8 | 9 | Intregii luati ca parametri vor fi de tip int. 10 | 11 | Afisati cel mai mare divizor comun al acestor numere, urmat de '\n'. CMMDC este 12 | intotdeauna un intreg pozitiv, ne-nul. 13 | 14 | Daca numarul de parametri este diferit de 2, programul va afisa doar '\n'. 15 | 16 | Exemplu: 17 | 18 | $> ./pgcd 42 10 | cat -e 19 | 2$ 20 | $> ./pgcd 42 12 | cat -e 21 | 6$ 22 | $> ./pgcd 14 77 | cat -e 23 | 7$ 24 | $> ./pgcd 17 3 | cat -e 25 | 1$ 26 | $> ./pgcd | cat -e 27 | $ 28 | -------------------------------------------------------------------------------- /level/2-0-last_word/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : last_word 2 | Expected files : last_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays its last word followed by a \n. 7 | 8 | A word is a section of string delimited by spaces/tabs or by the start/end of 9 | the string. 10 | 11 | If the number of parameters is not 1, or there are no words, display a newline. 12 | 13 | Example: 14 | 15 | $> ./last_word "FOR PONY" | cat -e 16 | PONY$ 17 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 18 | not$ 19 | $> ./last_word " " | cat -e 20 | $ 21 | $> ./last_word "a" "b" | cat -e 22 | $ 23 | $> ./last_word " lorem,ipsum " | cat -e 24 | lorem,ipsum$ 25 | $> 26 | -------------------------------------------------------------------------------- /level/4-2-ft_list_remove_if/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_remove_if 2 | Expected files : ft_list_remove_if.c 3 | Allowed functions: free 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function called ft_list_remove_if that removes from the 7 | passed list any element the data of which is "equal" to the reference data. 8 | 9 | It will be declared as follows : 10 | 11 | void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); 12 | 13 | cmp takes two void* and returns 0 when both parameters are equal. 14 | 15 | You have to use the ft_list.h file, which will contain: 16 | 17 | $>cat ft_list.h 18 | typedef struct s_list 19 | { 20 | struct s_list *next; 21 | void *data; 22 | } t_list; 23 | $> 24 | -------------------------------------------------------------------------------- /ExamFinal/2-0-last_word/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : last_word 2 | Expected files : last_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays its last word followed by a \n. 7 | 8 | A word is a section of string delimited by spaces/tabs or by the start/end of 9 | the string. 10 | 11 | If the number of parameters is not 1, or there are no words, display a newline. 12 | 13 | Example: 14 | 15 | $> ./last_word "FOR PONY" | cat -e 16 | PONY$ 17 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 18 | not$ 19 | $> ./last_word " " | cat -e 20 | $ 21 | $> ./last_word "a" "b" | cat -e 22 | $ 23 | $> ./last_word " lorem,ipsum " | cat -e 24 | lorem,ipsum$ 25 | $> 26 | -------------------------------------------------------------------------------- /level/4-0-ft_list_foreach/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_list_foreach 2 | Fisiere de iesire : ft_list_foreach.c, ft_list.h 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce ia ca parametru o lista si un pointer la o functie, si 7 | aplica functia la fiecare element al listei. 8 | 9 | Ea trebuie sa aiba prototipul urmator: 10 | 11 | void ft_list_foreach(t_list *begin_list, void (*f)(void *)); 12 | 13 | Functia point-ata de f va fi utilizata in modul urmator: 14 | 15 | (*f)(list_ptr->data); 16 | 17 | Trebuie sa utilizati structura urmatoare, si sa o predati/livrati intr-un 18 | fisier ft_list.h: 19 | 20 | typedef struct s_list 21 | { 22 | struct s_list *next; 23 | void *data; 24 | } t_list; 25 | -------------------------------------------------------------------------------- /level/4-4-ft_list_foreach/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_list_foreach 2 | Fisiere de iesire : ft_list_foreach.c, ft_list.h 3 | Functii autorizate : 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie ce ia ca parametru o lista si un pointer la o functie, si 7 | aplica functia la fiecare element al listei. 8 | 9 | Ea trebuie sa aiba prototipul urmator: 10 | 11 | void ft_list_foreach(t_list *begin_list, void (*f)(void *)); 12 | 13 | Functia point-ata de f va fi utilizata in modul urmator: 14 | 15 | (*f)(list_ptr->data); 16 | 17 | Trebuie sa utilizati structura urmatoare, si sa o predati/livrati intr-un 18 | fisier ft_list.h: 19 | 20 | typedef struct s_list 21 | { 22 | struct s_list *next; 23 | void *data; 24 | } t_list; 25 | -------------------------------------------------------------------------------- /level/1-1-rot_13/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rot_13 2 | Expected files : rot_13.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays it, replacing each of its 7 | letters by the letter 13 spaces ahead in alphabetical order. 8 | 9 | 'z' becomes 'm' and 'Z' becomes 'M'. Case remains unaffected. 10 | 11 | The output will be followed by a newline. 12 | 13 | If the number of arguments is not 1, the program displays a newline. 14 | 15 | Example: 16 | 17 | $>./rot_13 "abc" 18 | nop 19 | $>./rot_13 "My horse is Amazing." | cat -e 20 | Zl ubefr vf Nznmvat.$ 21 | $>./rot_13 "AkjhZ zLKIJz , 23y " | cat -e 22 | NxwuM mYXVWm , 23l $ 23 | $>./rot_13 | cat -e 24 | $ 25 | $> 26 | $>./rot_13 "" | cat -e 27 | $ 28 | $> 29 | -------------------------------------------------------------------------------- /level/1-1-rot_13/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : rot_13 2 | Fisiere de iesire : rot_13.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care primeste un sir de caractere si il afiseaza, inlocuind 7 | fiecare litera cu litera ce se afla cu 13 spatii dupa in ordine alfabetica. 8 | 9 | 'z' devine 'm' si 'Z' devine 'M'. Programul este case insensitive. 10 | 11 | Rezultatul va fi urmat de '\n'. 12 | 13 | Daca numarul parametrilos nu e 1, programul afiseaza '\n'. 14 | 15 | Exemple: 16 | 17 | $>./rot_13 "abc" 18 | nop 19 | $>./rot_13 "My horse is Amazing." | cat -e 20 | Zl ubefr vf Nznmvat.$ 21 | $>./rot_13 "AkjhZ zLKIJz , 23y " | cat -e 22 | NxwuM mYXVWm , 23l $ 23 | $>./rot_13 | cat -e 24 | $ 25 | $> 26 | $>./rot_13 "" | cat -e 27 | $ 28 | $> 29 | -------------------------------------------------------------------------------- /level/2-1-alpha_mirror/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : alpha_mirror 2 | Fisiere de iesire : alpha_mirror.c 3 | Functii autorizare : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program numit alpha_mirror care primeste un sir de caractere si 7 | afiseaza acest sir de caractere dupa ce inlocuieste fiecare caracter alfabetic 8 | cu caracterul alfabetic opus, urmat de '\n'. 9 | 10 | 'a' devine 'z', 'Z' devine 'A' 11 | 'd' devine 'w', 'M' devine 'N' 12 | 13 | si asa mai departe. 14 | 15 | Programul este case sensitive. 16 | 17 | Daca numarul de argumente nu este 1, se afiseaza un '\n'. 18 | 19 | Examples: 20 | 21 | $>./alpha_mirror "abc" 22 | zyx 23 | $>./alpha_mirror "My horse is Amazing." | cat -e 24 | Nb slihv rh Znzarmt.$ 25 | $>./alpha_mirror | cat -e 26 | $ 27 | $> 28 | -------------------------------------------------------------------------------- /level/4-0-ft_list_foreach/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_foreach 2 | Expected files : ft_list_foreach.c, ft_list.h 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend une liste et un pointeur sur fonction en 7 | paramètres, et applique la fonction à chaque élément de la liste. 8 | 9 | Elle devra être prototypée de la façon suivante: 10 | 11 | void ft_list_foreach(t_list *begin_list, void (*f)(void *)); 12 | 13 | La fonction pointée par f sera utilisée comme suit: 14 | 15 | (*f)(list_ptr->data); 16 | 17 | Vous devez utiliser la structure suivante, et la rendre dans un fichier 18 | ft_list.h: 19 | 20 | typedef struct s_list 21 | { 22 | struct s_list *next; 23 | void *data; 24 | } t_list; 25 | -------------------------------------------------------------------------------- /level/4-4-ft_list_foreach/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_list_foreach 2 | Expected files : ft_list_foreach.c, ft_list.h 3 | Allowed functions: 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend une liste et un pointeur sur fonction en 7 | paramètres, et applique la fonction à chaque élément de la liste. 8 | 9 | Elle devra être prototypée de la façon suivante: 10 | 11 | void ft_list_foreach(t_list *begin_list, void (*f)(void *)); 12 | 13 | La fonction pointée par f sera utilisée comme suit: 14 | 15 | (*f)(list_ptr->data); 16 | 17 | Vous devez utiliser la structure suivante, et la rendre dans un fichier 18 | ft_list.h: 19 | 20 | typedef struct s_list 21 | { 22 | struct s_list *next; 23 | void *data; 24 | } t_list; 25 | -------------------------------------------------------------------------------- /level/2-0-inter/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : inter 2 | Expected files : inter.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend en paramètres deux chaînes de caractères et qui 7 | affiche sans doublon les caractères communs aux deux chaînes. 8 | 9 | L'affichage se fera dans l'ordre d'apparition dans la premiere chaîne. 10 | L'affichage doit être suivi d'un '\n'. 11 | 12 | Si le nombre de paramètres transmis est différent de 2, le programme affiche 13 | '\n'. 14 | 15 | Exemples: 16 | $>./inter "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 17 | padinto$ 18 | $>./inter ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 19 | df6ewg4$ 20 | $>./inter "rien" "cette phrase ne cache rien" | cat -e 21 | rien$ 22 | $>./inter | cat -e 23 | $ 24 | -------------------------------------------------------------------------------- /level/3-3-ft_range/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_range 2 | Expected files : ft_range.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire la fonction suivante : 7 | 8 | int *ft_range(int start, int end); 9 | 10 | Cette fonction doit allouer avec malloc() un tableau d'ints, le remplir avec 11 | les valeurs (consécutives) démarrant à start et finissant à end (start et end 12 | inclus !), et renvoyer un pointeur vers la première valeur du tableau. 13 | 14 | Exemples: 15 | 16 | - Avec (1, 3) vous devrez renvoyer un tableau contenant 1, 2 et 3. 17 | - Avec (-1, 2) vous devrez renvoyer un tableau contenant -1, 0, 1 et 2. 18 | - Avec (0, 0) vous devrez renvoyer un tableau contenant 0. 19 | - Avec (0, -3) vous devrez renvoyer un tableau contenant 0, -1, -2 et -3. 20 | -------------------------------------------------------------------------------- /level/1-2-first_word/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : first_word 2 | Expected files : first_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays its first word, followed by a 7 | newline. 8 | 9 | A word is a section of string delimited by spaces/tabs or by the start/end of 10 | the string. 11 | 12 | If the number of parameters is not 1, or if there are no words, simply display 13 | a newline. 14 | 15 | Examples: 16 | 17 | $> ./first_word "FOR PONY" | cat -e 18 | FOR$ 19 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 20 | this$ 21 | $> ./first_word " " | cat -e 22 | $ 23 | $> ./first_word "a" "b" | cat -e 24 | $ 25 | $> ./first_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/1-3-first_word/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : first_word 2 | Expected files : first_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays its first word, followed by a 7 | newline. 8 | 9 | A word is a section of string delimited by spaces/tabs or by the start/end of 10 | the string. 11 | 12 | If the number of parameters is not 1, or if there are no words, simply display 13 | a newline. 14 | 15 | Examples: 16 | 17 | $> ./first_word "FOR PONY" | cat -e 18 | FOR$ 19 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 20 | this$ 21 | $> ./first_word " " | cat -e 22 | $ 23 | $> ./first_word "a" "b" | cat -e 24 | $ 25 | $> ./first_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/3-0-ft_rrange/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_rrange 2 | Expected files : ft_rrange.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire la fonction suivante : 7 | 8 | int *ft_rrange(int start, int end); 9 | 10 | Cette fonction doit allouer avec malloc() un tableau d'ints, le remplir avec 11 | les valeurs (consécutives) démarrant à end et finissant à start (start et end 12 | inclus !), et renvoyer un pointeur vers la première valeur du tableau. 13 | 14 | Exemples: 15 | 16 | - Avec (1, 3) vous devrez renvoyer un tableau contenant 3, 2 et 1. 17 | - Avec (-1, 2) vous devrez renvoyer un tableau contenant 2, 1, 0 et -1. 18 | - Avec (0, 0) vous devrez renvoyer un tableau contenant 0. 19 | - Avec (0, -3) vous devrez renvoyer un tableau contenant -3, -2, -1 et 0. 20 | -------------------------------------------------------------------------------- /level/3-0-pgcd/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : pgcd 2 | Expected files : pgcd.c 3 | Allowed functions: printf, atoi, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend deux chaînes de caractères représentant des 7 | nombres entiers positifs non nuls en paramètre. 8 | 9 | Les entiers représentés par les paramètres tiennent dans un int. 10 | 11 | Afficher le plus grand diviseur commun à ces deux nombres suivi de '\n'. Le 12 | PGCD est toujours un entier positif non nul. 13 | 14 | Si le nombre de paramètres est différent de 2, le programme affiche seulement 15 | '\n'. 16 | 17 | Exemple: 18 | 19 | $> ./pgcd 42 10 | cat -e 20 | 2$ 21 | $> ./pgcd 42 12 | cat -e 22 | 6$ 23 | $> ./pgcd 14 77 | cat -e 24 | 7$ 25 | $> ./pgcd 17 3 | cat -e 26 | 1$ 27 | $> ./pgcd | cat -e 28 | $ 29 | -------------------------------------------------------------------------------- /ExamFinal/3-0-pgcd/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : pgcd 2 | Expected files : pgcd.c 3 | Allowed functions: printf, atoi, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend deux chaînes de caractères représentant des 7 | nombres entiers positifs non nuls en paramètre. 8 | 9 | Les entiers représentés par les paramètres tiennent dans un int. 10 | 11 | Afficher le plus grand diviseur commun à ces deux nombres suivi de '\n'. Le 12 | PGCD est toujours un entier positif non nul. 13 | 14 | Si le nombre de paramètres est différent de 2, le programme affiche seulement 15 | '\n'. 16 | 17 | Exemple: 18 | 19 | $> ./pgcd 42 10 | cat -e 20 | 2$ 21 | $> ./pgcd 42 12 | cat -e 22 | 6$ 23 | $> ./pgcd 14 77 | cat -e 24 | 7$ 25 | $> ./pgcd 17 3 | cat -e 26 | 1$ 27 | $> ./pgcd | cat -e 28 | $ 29 | -------------------------------------------------------------------------------- /level/3-2-ft_atoi_base/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_atoi_base 2 | Expected files : ft_atoi_base.c 3 | Allowed functions: None 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that converts the string argument str (base N <= 16) 7 | to an integer (base 10) and returns it. 8 | 9 | The characters recognized in the input are: 0123456789abcdef 10 | Those are, of course, to be trimmed according to the requested base. For 11 | example, base 4 recognizes "0123" and base 16 recognizes "0123456789abcdef". 12 | 13 | Uppercase letters must also be recognized: "12fdb3" is the same as "12FDB3". 14 | 15 | Minus signs ('-') are interpreted only if they are the first character of the 16 | string. 17 | 18 | Your function must be declared as follows: 19 | 20 | int ft_atoi_base(const char *str, int str_base); 21 | -------------------------------------------------------------------------------- /level/2-0-union/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : union 2 | Expected files : union.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes two strings and displays, without doubles, the 7 | characters that appear in either one of the strings. 8 | 9 | The display will be in the order characters appear in the command line, and 10 | will be followed by a \n. 11 | 12 | If the number of arguments is not 2, the program displays \n. 13 | 14 | Example: 15 | 16 | $>./union zpadinton "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 17 | zpadintoqefwjy$ 18 | $>./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 19 | df6vewg4thras$ 20 | $>./union "rien" "cette phrase ne cache rien" | cat -e 21 | rienct phas$ 22 | $>./union | cat -e 23 | $ 24 | $> 25 | $>./union "rien" | cat -e 26 | $ 27 | $> 28 | -------------------------------------------------------------------------------- /level/3-1-tab_mult/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : tab_mult 2 | Expected files : tab_mult.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that displays a number's multiplication table. 7 | 8 | The parameter will always be a strictly positive number that fits in an int, 9 | and said number times 9 will also fit in an int. 10 | 11 | If there are no parameters, the program displays \n. 12 | 13 | Examples: 14 | 15 | $>./tab_mult 9 16 | 1 x 9 = 9 17 | 2 x 9 = 18 18 | 3 x 9 = 27 19 | 4 x 9 = 36 20 | 5 x 9 = 45 21 | 6 x 9 = 54 22 | 7 x 9 = 63 23 | 8 x 9 = 72 24 | 9 x 9 = 81 25 | $>./tab_mult 19 26 | 1 x 19 = 19 27 | 2 x 19 = 38 28 | 3 x 19 = 57 29 | 4 x 19 = 76 30 | 5 x 19 = 95 31 | 6 x 19 = 114 32 | 7 x 19 = 133 33 | 8 x 19 = 152 34 | 9 x 19 = 171 35 | $> 36 | $>./tab_mult | cat -e 37 | $ 38 | $> 39 | -------------------------------------------------------------------------------- /Exam00/1-1-hello/1-1-hello.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e1r6p1.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 4 17:34:29 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = hello ======================================================================== 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /level/3-1-tab_mult/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : tab_mult 2 | Fisiere de iesire : tab_mult.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce afiseaza tabla inmultirii unui numar transmis ca parametru. 7 | 8 | Parametrul va fi intotdeauna un numar strict pozitiv de tip int si acest numar 9 | multiplicat cu 9 va fi de tip int. 10 | 11 | Daca nu exista niciun parametru, programul va afisa '\n'. 12 | 13 | Exemplu: 14 | 15 | $>./tab_mult 9 16 | 1 x 9 = 9 17 | 2 x 9 = 18 18 | 3 x 9 = 27 19 | 4 x 9 = 36 20 | 5 x 9 = 45 21 | 6 x 9 = 54 22 | 7 x 9 = 63 23 | 8 x 9 = 72 24 | 9 x 9 = 81 25 | $>./tab_mult 19 26 | 1 x 19 = 19 27 | 2 x 19 = 38 28 | 3 x 19 = 57 29 | 4 x 19 = 76 30 | 5 x 19 = 95 31 | 6 x 19 = 114 32 | 7 x 19 = 133 33 | 8 x 19 = 152 34 | 9 x 19 = 171 35 | $> 36 | $>./tab_mult | cat -e 37 | $ 38 | $> 39 | -------------------------------------------------------------------------------- /Exam00/3-1-ft_strcpy/3-1-ft_strcpy.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e3r6p6.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 4 18:35:57 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = ft_strcpy ==================================================================== 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /Exam00/4-0-ft_atoi/4-0-ft_atoi.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e3r8p21.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 4 19:21:29 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = ft_atoi ====================================================================== 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /level/1-0-repeat_alpha/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : repeat_alpha 2 | Expected files : repeat_alpha.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program called repeat_alpha that takes a string and display it 7 | repeating each alphabetical character as many times as its alphabetical index, 8 | followed by a newline. 9 | 10 | 'a' becomes 'a', 'b' becomes 'bb', 'e' becomes 'eeeee', etc... 11 | 12 | Case remains unchanged. 13 | 14 | If the number of arguments is not 1, just display a newline. 15 | 16 | Examples: 17 | 18 | $>./repeat_alpha "abc" 19 | abbccc 20 | $>./repeat_alpha "Alex." | cat -e 21 | Alllllllllllleeeeexxxxxxxxxxxxxxxxxxxxxxxx.$ 22 | $>./repeat_alpha 'abacadaba 42!' | cat -e 23 | abbacccaddddabba 42!$ 24 | $>./repeat_alpha | cat -e 25 | $ 26 | $> 27 | $>./repeat_alpha "" | cat -e 28 | $ 29 | $> 30 | -------------------------------------------------------------------------------- /Exam02/2-0-swap_bits/2-0-swap_bits.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e3r12p2.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 18 17:28:12 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = swap_bits ==================================================================== 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /Exam02/5-1-brainfuck/5-1-brainfuck.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e1r12p14.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 18 20:32:06 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = brainfuck ==================================================================== 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /level/1-0-repeat_alpha/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : repeat_alpha 2 | Expected files : repeat_alpha.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme repeat_alpha qui prend une chaîne et l'affiche en répétant 7 | chaque caractère alphabétique autant de fois que son index dans l'alphabet, 8 | suivie d'un newline. 9 | 10 | 'a' devient 'a', 'b' devient 'bb', 'e' devient 'eeeee', etc... 11 | 12 | La casse ne change pas. 13 | 14 | Si le nombre d'arguments n'est pas 1, affiche juste un newline. 15 | 16 | Exemples: 17 | 18 | $>./repeat_alpha "abc" 19 | abbccc 20 | $>./repeat_alpha "Alex." | cat -e 21 | Alllllllllllleeeeexxxxxxxxxxxxxxxxxxxxxxxx.$ 22 | $>./repeat_alpha 'abacadaba 42!' | cat -e 23 | abbacccaddddabba 42!$ 24 | $>./repeat_alpha | cat -e 25 | $ 26 | $> 27 | $>./repeat_alpha "" | cat -e 28 | $ 29 | $> 30 | -------------------------------------------------------------------------------- /level/3-2-ft_atoi_base/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_atoi_base 2 | Expected files : ft_atoi_base.c 3 | Allowed functions: None 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction convertit son argument 'str', une chaîne (en base N <= 16) 7 | en un entier (base 10) et le retourne. 8 | 9 | Les caractères reconnus dans l'entrée sont : 0123456789abcdef Bien entendu, la 10 | base demandée conditionne le nombre de caractères à prendre en compte. Par 11 | exemple, la base 4 reconnaîtra "0123" et la base 16 reconnaîtra 12 | "0123456789abcdef". 13 | 14 | Les majuscules marchent aussi : "12fdb3" est pareil que "12FDB3". 15 | 16 | Les caractères '-' doivent être interprétés seulement s'ils sont en première 17 | position dans la chaîne. 18 | 19 | Votre fonction sera déclarée comme suit: 20 | 21 | int ft_atoi_base(const char *str, int str_base); 22 | -------------------------------------------------------------------------------- /Exam02/5-0-ft_itoa_base/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa_base 2 | Expected files : ft_itoa_base.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that converts an integer value to a null-terminated string 7 | using the specified base and stores the result in a char array that you must 8 | allocate. 9 | 10 | The base is expressed as an integer, from 2 to 16. The characters comprising 11 | the base are the digits from 0 to 9, followed by uppercase letter from A to F. 12 | 13 | For example, base 4 would be "0123" and base 16 "0123456789ABCDEF". 14 | 15 | If base is 10 and value is negative, the resulting string is preceded with a 16 | minus sign (-). With any other base, value is always considered unsigned. 17 | 18 | Your function must be declared as follows: 19 | 20 | char *ft_itoa_base(int value, int base); 21 | -------------------------------------------------------------------------------- /Exam02/5-2-print_memory/5-2-print_memory.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e1r13p11.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 18 20:47:17 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = print_memory ================================================================= 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /ExamFinal/5-1-ft_itoa_base/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa_base 2 | Expected files : ft_itoa_base.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that converts an integer value to a null-terminated string 7 | using the specified base and stores the result in a char array that you must 8 | allocate. 9 | 10 | The base is expressed as an integer, from 2 to 16. The characters comprising 11 | the base are the digits from 0 to 9, followed by uppercase letter from A to F. 12 | 13 | For example, base 4 would be "0123" and base 16 "0123456789ABCDEF". 14 | 15 | If base is 10 and value is negative, the resulting string is preceded with a 16 | minus sign (-). With any other base, value is always considered unsigned. 17 | 18 | Your function must be declared as follows: 19 | 20 | char *ft_itoa_base(int value, int base); 21 | -------------------------------------------------------------------------------- /ExamFinal/5-2-print_memory/5-2-print_memory.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e3r5p13.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Sat Sep 26 14:42:43 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = print_memory ================================================================= 21 | Nothing turned in 22 | Grade: 0 23 | 24 | = Final grade: 0 =============================================================== 25 | -------------------------------------------------------------------------------- /level/1-0-repeat_alpha/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : repeat_alpha 2 | Fisiere de iesire : repeat_alpha.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program numit repeat_alpha care primeste un sir de caractere si il 7 | afiseaza repetand fiecare caracter alfabetic de atatea ori cat indexul sau 8 | alfabetic, urmat de un '\n'. 9 | 10 | 'a' becomes 'a', 'b' becomes 'bb', 'e' becomes 'eeeee', etc... 11 | 12 | Majusculele raman neschimbate. 13 | 14 | Daca numarul de argumente nu e 1, programul afiseaza '\n'. 15 | 16 | Exemple: 17 | 18 | $>./repeat_alpha "abc" 19 | abbccc 20 | $>./repeat_alpha "Alex." | cat -e 21 | Alllllllllllleeeeexxxxxxxxxxxxxxxxxxxxxxxx.$ 22 | $>./repeat_alpha 'abacadaba 42!' | cat -e 23 | abbacccaddddabba 42!$ 24 | $>./repeat_alpha | cat -e 25 | $ 26 | $> 27 | $>./repeat_alpha "" | cat -e 28 | $ 29 | $> 30 | -------------------------------------------------------------------------------- /level/5-2-ft_itoa_base/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa_base 2 | Expected files : ft_itoa_base.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that converts an integer value to a null-terminated string 7 | using the specified base and stores the result in a char array that you must 8 | allocate. 9 | 10 | The base is expressed as an integer, from 2 to 16. The characters comprising 11 | the base are the digits from 0 to 9, followed by uppercase letter from A to F. 12 | 13 | For example, base 4 would be "0123" and base 16 "0123456789ABCDEF". 14 | 15 | If base is 10 and value is negative, the resulting string is preceded with a 16 | minus sign (-). With any other base, value is always considered unsigned. 17 | 18 | Your function must be declared as follows: 19 | 20 | char *ft_itoa_base(int value, int base); 21 | -------------------------------------------------------------------------------- /level/3-1-tab_mult/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : tab_mult 2 | Expected files : tab_mult.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui affiche la table de multiplication d'un nombre passé en paramètre. 7 | 8 | Le paramètre sera toujours un nombre strictement positif qui rentre dans un int, et ce nombre multiplié par 9 tiendra aussi dans un int. 9 | 10 | S'il n'y a pas de paramètre, le programme affiche \n. 11 | 12 | Exemple: 13 | 14 | $>./tab_mult 9 15 | 1 x 9 = 9 16 | 2 x 9 = 18 17 | 3 x 9 = 27 18 | 4 x 9 = 36 19 | 5 x 9 = 45 20 | 6 x 9 = 54 21 | 7 x 9 = 63 22 | 8 x 9 = 72 23 | 9 x 9 = 81 24 | $>./tab_mult 19 25 | 1 x 19 = 19 26 | 2 x 19 = 38 27 | 3 x 19 = 57 28 | 4 x 19 = 76 29 | 5 x 19 = 95 30 | 6 x 19 = 114 31 | 7 x 19 = 133 32 | 8 x 19 = 152 33 | 9 x 19 = 171 34 | $> 35 | $>./tab_mult | cat -e 36 | $ 37 | $> 38 | -------------------------------------------------------------------------------- /level/3-0-ft_rrange/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_rrange 2 | Fisier de iesire : ft_rrange.c 3 | Functii autorizate : malloc 4 | -------------------------------------------------------------------------------- 5 | Scrieti functia urmatoare: 6 | 7 | int *ft_rrange(int start, int end); 8 | 9 | Aceasta functie trebuie sa aloce cu ajutorul functiei malloc() un tablou de 10 | intregi si sa-l umple valori (consecutive) incepand cu endsi terminand cu start 11 | (start si end incluse!), si sa returneze un pointer spre prima valoare a tabloului. 12 | 13 | Exemplu: 14 | 15 | 16 | Cu parametri (1, 3) trebuie sa returnati un tablou continand valorile 3, 2 si 1. 17 | 18 | Cu parametri (-1, 2) trebuie sa returnati un tablou continand valorile 2, 1, 0 si -1. 19 | 20 | Cu parametri (0, 0) trebuie sa returnati un tablou continand valorile 0. 21 | 22 | Cu parametri (0, -3) trebuie sa returnati un tablou continand valorile -3, -2, -1 si 0. 23 | -------------------------------------------------------------------------------- /level/3-0-hidenp/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : hidenp 2 | Expected files : hidenp.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program named hidenp that takes two strings and displays 1 7 | followed by a newline if the first string is hidden in the second one, 8 | otherwise displays 0 followed by a newline. 9 | 10 | Let s1 and s2 be strings. We say that s1 is hidden in s2 if it's possible to 11 | find each character from s1 in s2, in the same order as they appear in s1. 12 | Also, the empty string is hidden in any string. 13 | 14 | If the number of parameters is not 2, the program displays a newline. 15 | 16 | Examples : 17 | 18 | $>./hidenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e 19 | 1$ 20 | $>./hidenp "abc" "2altrb53c.sse" | cat -e 21 | 1$ 22 | $>./hidenp "abc" "btarc" | cat -e 23 | 0$ 24 | $>./hidenp | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /Exam02/2-1-last_word/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : last_word 2 | Fisiere de iesire : last_word.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza ultimul 7 | cuvant al acestui sir urmat de '\n'. 8 | 9 | Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau 10 | tabulatoare, fie de incepulul ori sfarsitul sirului. 11 | 12 | Daca numarul de parametri transmis este diferit de 1, sau nu exista nicun cuvant 13 | de afisat, programul va afisa '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./last_word "FOR PONY" | cat -e 18 | PONY$ 19 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 20 | not$ 21 | $> ./last_word " " | cat -e 22 | $ 23 | $> ./last_word "a" "b" | cat -e 24 | $ 25 | $> ./last_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/2-0-last_word/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : last_word 2 | Fisiere de iesire : last_word.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza ultimul 7 | cuvant al acestui sir urmat de '\n'. 8 | 9 | Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau 10 | tabulatoare, fie de incepulul ori sfarsitul sirului. 11 | 12 | Daca numarul de parametri transmis este diferit de 1, sau nu exista nicun cuvant 13 | de afisat, programul va afisa '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./last_word "FOR PONY" | cat -e 18 | PONY$ 19 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 20 | not$ 21 | $> ./last_word " " | cat -e 22 | $ 23 | $> ./last_word "a" "b" | cat -e 24 | $ 25 | $> ./last_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/3-3-ft_range/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ft_range 2 | Fisiere de iesire : ft_range.c 3 | Functii autorizate : malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti functia urmatoare: 7 | 8 | int *ft_range(int start, int end); 9 | 10 | Aceasta functie trebuie sa aloce cu ajutorul functiei malloc() un tablou de 11 | intregi si sa-l umple valori (consecutive) incepand cu start si terminand cu 12 | end (start si end incluse!), si sa returneze un pointer spre prima valoare 13 | a tabloului. 14 | 15 | Exemplu: 16 | 17 | 18 | Cu parametri (1, 3) trebuie sa returnati un tablou continand valorile 1, 2 si 3. 19 | 20 | Cu parametri (-1, 2) trebuie sa returnati un tablou continand valorile -1, 0, 1 si 2. 21 | 22 | Cu parametri (0, 0) trebuie sa returnati un tablou continand valorile 0. 23 | 24 | Cu parametri (0, -3) trebuie sa returnati un tablou continand valorile 0, -1, -2 si -3. 25 | -------------------------------------------------------------------------------- /ExamFinal/2-0-last_word/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : last_word 2 | Fisiere de iesire : last_word.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza ultimul 7 | cuvant al acestui sir urmat de '\n'. 8 | 9 | Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau 10 | tabulatoare, fie de incepulul ori sfarsitul sirului. 11 | 12 | Daca numarul de parametri transmis este diferit de 1, sau nu exista nicun cuvant 13 | de afisat, programul va afisa '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./last_word "FOR PONY" | cat -e 18 | PONY$ 19 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 20 | not$ 21 | $> ./last_word " " | cat -e 22 | $ 23 | $> ./last_word "a" "b" | cat -e 24 | $ 25 | $> ./last_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /Exam02/5-2-print_memory/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste (const void *addr, size_t size), si afiseaza memoria precum in exemplu. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | void print_memory(const void *addr, size_t size); 11 | 12 | --------- 13 | $> cat main.c 14 | void print_memory(const void *addr, size_t size); 15 | 16 | int main(void) 17 | { 18 | int tab[10] = {0, 23, 150, 255, 19 | 12, 16, 21, 42}; 20 | 21 | print_memory(tab, sizeof(tab)); 22 | return (0); 23 | } 24 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 25 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 26 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 27 | 0000 0000 0000 0000 ........$ 28 | 29 | -------------------------------------------------------------------------------- /level/5-1-print_memory/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste (const void *addr, size_t size), si afiseaza memoria precum in exemplu. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | void print_memory(const void *addr, size_t size); 11 | 12 | --------- 13 | $> cat main.c 14 | void print_memory(const void *addr, size_t size); 15 | 16 | int main(void) 17 | { 18 | int tab[10] = {0, 23, 150, 255, 19 | 12, 16, 21, 42}; 20 | 21 | print_memory(tab, sizeof(tab)); 22 | return (0); 23 | } 24 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 25 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 26 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 27 | 0000 0000 0000 0000 ........$ 28 | 29 | -------------------------------------------------------------------------------- /Exam00/3-0-ft_strrev/rendu/st_strrev.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* st_strrev.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: exam +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2015/09/04 18:01:13 by exam #+# #+# */ 9 | /* Updated: 2015/09/04 18:01:35 by exam ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | 14 | -------------------------------------------------------------------------------- /ExamFinal/5-2-print_memory/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti o functie care primeste (const void *addr, size_t size), si afiseaza memoria precum in exemplu. 7 | 8 | Functia trebuie declarata ca si mai jos: 9 | 10 | void print_memory(const void *addr, size_t size); 11 | 12 | --------- 13 | $> cat main.c 14 | void print_memory(const void *addr, size_t size); 15 | 16 | int main(void) 17 | { 18 | int tab[10] = {0, 23, 150, 255, 19 | 12, 16, 21, 42}; 20 | 21 | print_memory(tab, sizeof(tab)); 22 | return (0); 23 | } 24 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 25 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 26 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 27 | 0000 0000 0000 0000 ........$ 28 | 29 | -------------------------------------------------------------------------------- /Exam02/2-1-last_word/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : last_word 2 | Expected files : last_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne de caractères en paramètre, et qui 7 | affiche le dernier mot de cette chaîne, suivi d'un '\n'. 8 | 9 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 10 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 11 | 12 | Si le nombre de paramètres transmis est différent de 1, ou s'il n'y a aucun mot 13 | à afficher, le programme affiche '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./last_word "FOR PONY" | cat -e 18 | PONY$ 19 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 20 | not$ 21 | $> ./last_word " " | cat -e 22 | $ 23 | $> ./last_word "a" "b" | cat -e 24 | $ 25 | $> ./last_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /Exam02/5-2-print_memory/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes (const void *addr, size_t size), and displays the 7 | memory as in the example. 8 | 9 | Your function must be declared as follows: 10 | 11 | void print_memory(const void *addr, size_t size); 12 | 13 | --------- 14 | $> cat main.c 15 | void print_memory(const void *addr, size_t size); 16 | 17 | int main(void) 18 | { 19 | int tab[10] = {0, 23, 150, 255, 20 | 12, 16, 21, 42}; 21 | 22 | print_memory(tab, sizeof(tab)); 23 | return (0); 24 | } 25 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 26 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 27 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 28 | 0000 0000 0000 0000 ........$ 29 | 30 | -------------------------------------------------------------------------------- /ExamFinal/5-2-print_memory/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes (const void *addr, size_t size), and displays the 7 | memory as in the example. 8 | 9 | Your function must be declared as follows: 10 | 11 | void print_memory(const void *addr, size_t size); 12 | 13 | --------- 14 | $> cat main.c 15 | void print_memory(const void *addr, size_t size); 16 | 17 | int main(void) 18 | { 19 | int tab[10] = {0, 23, 150, 255, 20 | 12, 16, 21, 42}; 21 | 22 | print_memory(tab, sizeof(tab)); 23 | return (0); 24 | } 25 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 26 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 27 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 28 | 0000 0000 0000 0000 ........$ 29 | 30 | -------------------------------------------------------------------------------- /level/2-0-last_word/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : last_word 2 | Expected files : last_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne de caractères en paramètre, et qui 7 | affiche le dernier mot de cette chaîne, suivi d'un '\n'. 8 | 9 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 10 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 11 | 12 | Si le nombre de paramètres transmis est différent de 1, ou s'il n'y a aucun mot 13 | à afficher, le programme affiche '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./last_word "FOR PONY" | cat -e 18 | PONY$ 19 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 20 | not$ 21 | $> ./last_word " " | cat -e 22 | $ 23 | $> ./last_word "a" "b" | cat -e 24 | $ 25 | $> ./last_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/2-0-union/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : union 2 | Fisiere de iesire : union.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program numit union ce ia ca parametri doua siruri de caractere si 7 | care afiseaza toate caracterele, fara a le dubla, apartinind oricaruia din cele 8 | doua siruri. 9 | 10 | Afisarea se va face in ordinea de aparitie din linia de comanda. 11 | 12 | Afisarea trebuie sa fie urmata de un retour de linie. 13 | 14 | Daca numarul de parametre transmis este diferit de 2, programul va afisa '\n'. 15 | 16 | Exemplu: 17 | 18 | $>./union zpadinton "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 19 | zpadintoqefwjy$ 20 | $>./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 21 | df6vewg4thras$ 22 | $>./union "rien" "cette phrase ne cache rien" | cat -e 23 | rienct phas$ 24 | $>./union | cat -e 25 | $ 26 | $> 27 | $>./union "rien" | cat -e 28 | $ 29 | $> 30 | -------------------------------------------------------------------------------- /level/5-1-print_memory/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a function that takes (const void *addr, size_t size), and displays the 7 | memory as in the example. 8 | 9 | Your function must be declared as follows: 10 | 11 | void print_memory(const void *addr, size_t size); 12 | 13 | --------- 14 | $> cat main.c 15 | void print_memory(const void *addr, size_t size); 16 | 17 | int main(void) 18 | { 19 | int tab[10] = {0, 23, 150, 255, 20 | 12, 16, 21, 42}; 21 | 22 | print_memory(tab, sizeof(tab)); 23 | return (0); 24 | } 25 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 26 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 27 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 28 | 0000 0000 0000 0000 ........$ 29 | 30 | -------------------------------------------------------------------------------- /Exam02/5-2-print_memory/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend (const void *addr, size_t size) et affiche la mémoire pointée comme dans l'exemple. 7 | 8 | Votre fonction sera prototypée comme suit: 9 | 10 | void print_memory(const void *addr, size_t size); 11 | 12 | --------- 13 | $> cat main.c 14 | void print_memory(const void *addr, size_t size); 15 | 16 | int main(void) 17 | { 18 | int tab[10] = {0, 23, 150, 255, 19 | 12, 16, 21, 42}; 20 | 21 | print_memory(tab, sizeof(tab)); 22 | return (0); 23 | } 24 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 25 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 26 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 27 | 0000 0000 0000 0000 ........$ 28 | 29 | -------------------------------------------------------------------------------- /ExamFinal/2-0-last_word/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : last_word 2 | Expected files : last_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne de caractères en paramètre, et qui 7 | affiche le dernier mot de cette chaîne, suivi d'un '\n'. 8 | 9 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 10 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 11 | 12 | Si le nombre de paramètres transmis est différent de 1, ou s'il n'y a aucun mot 13 | à afficher, le programme affiche '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./last_word "FOR PONY" | cat -e 18 | PONY$ 19 | $> ./last_word "this ... is sparta, then again, maybe not" | cat -e 20 | not$ 21 | $> ./last_word " " | cat -e 22 | $ 23 | $> ./last_word "a" "b" | cat -e 24 | $ 25 | $> ./last_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /ExamFinal/5-2-print_memory/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend (const void *addr, size_t size) et affiche la mémoire pointée comme dans l'exemple. 7 | 8 | Votre fonction sera prototypée comme suit: 9 | 10 | void print_memory(const void *addr, size_t size); 11 | 12 | --------- 13 | $> cat main.c 14 | void print_memory(const void *addr, size_t size); 15 | 16 | int main(void) 17 | { 18 | int tab[10] = {0, 23, 150, 255, 19 | 12, 16, 21, 42}; 20 | 21 | print_memory(tab, sizeof(tab)); 22 | return (0); 23 | } 24 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 25 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 26 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 27 | 0000 0000 0000 0000 ........$ 28 | 29 | -------------------------------------------------------------------------------- /level/1-2-first_word/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : first_word 2 | Fisiere de iesire : first_word.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care ia ca parametru un sir de caractere si afiseaza primul 7 | cuvant din acest sir, urmat de un '\n'. 8 | 9 | Numim "cuvant" o portiune a sirului de caractere delimitat de spatii sau/si 10 | tabulatori, atat la inceputul cat si la sfarsitul sirului. 11 | 12 | Daca numarul de parametri transmis este diferit de 1, sau daca nu este niciun 13 | cuvant de afisat, programul va afisa \texttt'\n'. 14 | 15 | Exemplu: 16 | 17 | $> ./first_word "FOR PONY" | cat -e 18 | FOR$ 19 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 20 | this$ 21 | $> ./first_word " " | cat -e 22 | $ 23 | $> ./first_word "a" "b" | cat -e 24 | $ 25 | $> ./first_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | 29 | 30 | -------------------------------------------------------------------------------- /level/1-3-first_word/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : first_word 2 | Fisiere de iesire : first_word.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program care ia ca parametru un sir de caractere si afiseaza primul 7 | cuvant din acest sir, urmat de un '\n'. 8 | 9 | Numim "cuvant" o portiune a sirului de caractere delimitat de spatii sau/si 10 | tabulatori, atat la inceputul cat si la sfarsitul sirului. 11 | 12 | Daca numarul de parametri transmis este diferit de 1, sau daca nu este niciun 13 | cuvant de afisat, programul va afisa \texttt'\n'. 14 | 15 | Exemplu: 16 | 17 | $> ./first_word "FOR PONY" | cat -e 18 | FOR$ 19 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 20 | this$ 21 | $> ./first_word " " | cat -e 22 | $ 23 | $> ./first_word "a" "b" | cat -e 24 | $ 25 | $> ./first_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | 29 | 30 | -------------------------------------------------------------------------------- /level/4-0-fprime/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : fprime 2 | Expected files : fprime.c 3 | Allowed functions: printf, atoi 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a positive int and displays its prime factors on the 7 | standard output, followed by a newline. 8 | 9 | Factors must be displayed in ascending order and separated by '*', so that 10 | the expression in the output gives the right result. 11 | 12 | If the number of parameters is not 1, simply display a newline. 13 | 14 | The input, when there's one, will be valid. 15 | 16 | Examples: 17 | 18 | $> ./fprime 225225 | cat -e 19 | 3*3*5*5*7*11*13$ 20 | $> ./fprime 8333325 | cat -e 21 | 3*3*5*5*7*11*13*37$ 22 | $> ./fprime 9539 | cat -e 23 | 9539$ 24 | $> ./fprime 804577 | cat -e 25 | 804577$ 26 | $> ./fprime 42 | cat -e 27 | 2*3*7$ 28 | $> ./fprime 1 | cat -e 29 | 1$ 30 | $> ./fprime | cat -e 31 | $ 32 | $> ./fprime 42 21 | cat -e 33 | $ 34 | -------------------------------------------------------------------------------- /level/5-1-print_memory/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : print_memory 2 | Expected files : print_memory.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend (const void *addr, size_t size) et affiche la mémoire pointée comme dans l'exemple. 7 | 8 | Votre fonction sera prototypée comme suit: 9 | 10 | void print_memory(const void *addr, size_t size); 11 | 12 | --------- 13 | $> cat main.c 14 | void print_memory(const void *addr, size_t size); 15 | 16 | int main(void) 17 | { 18 | int tab[10] = {0, 23, 150, 255, 19 | 12, 16, 21, 42}; 20 | 21 | print_memory(tab, sizeof(tab)); 22 | return (0); 23 | } 24 | $> gcc -Wall -Wall -Werror main.c print_memory.c && ./a.out | cat -e 25 | 0000 0000 1700 0000 9600 0000 ff00 0000 ................$ 26 | 0c00 0000 1000 0000 1500 0000 2a00 0000 ............*...$ 27 | 0000 0000 0000 0000 ........$ 28 | 29 | -------------------------------------------------------------------------------- /Exam01/4-0-rostring/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rostring 2 | Expected files : rostring.c 3 | Allowed functions: write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays this string after rotating it 7 | one word to the left. 8 | 9 | Thus, the first word becomes the last, and others stay in the same order. 10 | 11 | A "word" is defined as a part of a string delimited either by spaces/tabs, or 12 | by the start/end of the string. 13 | 14 | Words will be separated by only one space in the output. 15 | 16 | If there's less than one argument, the program displays \n. 17 | 18 | Example: 19 | 20 | $>./rostring "abc " | cat -e 21 | abc$ 22 | $> 23 | $>./rostring "Que la lumiere soit et la lumiere fut" 24 | la lumiere soit et la lumiere fut Que 25 | $> 26 | $>./rostring " AkjhZ zLKIJz , 23y" 27 | zLKIJz , 23y AkjhZ 28 | $> 29 | $>./rostring | cat -e 30 | $ 31 | $> 32 | -------------------------------------------------------------------------------- /ExamFinal/4-0-fprime/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : fprime 2 | Expected files : fprime.c 3 | Allowed functions: printf, atoi 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a positive int and displays its prime factors on the 7 | standard output, followed by a newline. 8 | 9 | Factors must be displayed in ascending order and separated by '*', so that 10 | the expression in the output gives the right result. 11 | 12 | If the number of parameters is not 1, simply display a newline. 13 | 14 | The input, when there's one, will be valid. 15 | 16 | Examples: 17 | 18 | $> ./fprime 225225 | cat -e 19 | 3*3*5*5*7*11*13$ 20 | $> ./fprime 8333325 | cat -e 21 | 3*3*5*5*7*11*13*37$ 22 | $> ./fprime 9539 | cat -e 23 | 9539$ 24 | $> ./fprime 804577 | cat -e 25 | 804577$ 26 | $> ./fprime 42 | cat -e 27 | 2*3*7$ 28 | $> ./fprime 1 | cat -e 29 | 1$ 30 | $> ./fprime | cat -e 31 | $ 32 | $> ./fprime 42 21 | cat -e 33 | $ 34 | -------------------------------------------------------------------------------- /level/1-2-first_word/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : first_word 2 | Expected files : first_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne de caractères en paramètre, et qui 7 | affiche le premier mot de cette chaîne, suivi d'un '\n'. 8 | 9 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 10 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 11 | 12 | Si le nombre de paramètres transmis est différent de 1, ou s'il n'y a aucun mot 13 | à afficher, le programme affiche '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./first_word "FOR PONY" | cat -e 18 | FOR$ 19 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 20 | this$ 21 | $> ./first_word " " | cat -e 22 | $ 23 | $> ./first_word "a" "b" | cat -e 24 | $ 25 | $> ./first_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/1-3-first_word/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : first_word 2 | Expected files : first_word.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend une chaîne de caractères en paramètre, et qui 7 | affiche le premier mot de cette chaîne, suivi d'un '\n'. 8 | 9 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 10 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 11 | 12 | Si le nombre de paramètres transmis est différent de 1, ou s'il n'y a aucun mot 13 | à afficher, le programme affiche '\n'. 14 | 15 | Exemple: 16 | 17 | $> ./first_word "FOR PONY" | cat -e 18 | FOR$ 19 | $> ./first_word "this ... is sparta, then again, maybe not" | cat -e 20 | this$ 21 | $> ./first_word " " | cat -e 22 | $ 23 | $> ./first_word "a" "b" | cat -e 24 | $ 25 | $> ./first_word " lorem,ipsum " | cat -e 26 | lorem,ipsum$ 27 | $> 28 | -------------------------------------------------------------------------------- /level/2-0-union/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : union 2 | Expected files : union.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Ècrire un programme nommé union qui prend en paramètre deux chaînes de 7 | caractères et qui affiche, sans doublon, les caractères qui apparaissent dans 8 | l'une ou dans l'autre. 9 | 10 | L'affichage se fera dans l'ordre d'apparition dans la ligne de commande. 11 | 12 | L'affichage doit etre suivi d'un retour à la ligne. 13 | 14 | Si le nombre de paramètres transmis est différent de 2, le programme affiche 15 | \n. 16 | 17 | Exemple: 18 | 19 | $>./union zpadinton "paqefwtdjetyiytjneytjoeyjnejeyj" | cat -e 20 | zpadintoqefwjy$ 21 | $>./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e 22 | df6vewg4thras$ 23 | $>./union "rien" "cette phrase ne cache rien" | cat -e 24 | rienct phas$ 25 | $>./union | cat -e 26 | $ 27 | $> 28 | $>./union "rien" | cat -e 29 | $ 30 | $> 31 | -------------------------------------------------------------------------------- /level/4-6-rostring/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rostring 2 | Expected files : rostring.c 3 | Allowed functions: write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays this string after rotating it 7 | one word to the left. 8 | 9 | Thus, the first word becomes the last, and others stay in the same order. 10 | 11 | A "word" is defined as a part of a string delimited either by spaces/tabs, or 12 | by the start/end of the string. 13 | 14 | Words will be separated by only one space in the output. 15 | 16 | If there's less than one argument, the program displays \n. 17 | 18 | Example: 19 | 20 | $>./rostring "abc " | cat -e 21 | abc$ 22 | $> 23 | $>./rostring "Que la lumiere soit et la lumiere fut" 24 | la lumiere soit et la lumiere fut Que 25 | $> 26 | $>./rostring " AkjhZ zLKIJz , 23y" 27 | zLKIJz , 23y AkjhZ 28 | $> 29 | $>./rostring | cat -e 30 | $ 31 | $> 32 | -------------------------------------------------------------------------------- /level/2-3-wdmatch/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : wdmatch 2 | Expected files : wdmatch.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes two strings and checks whether it's possible to 7 | write the first string with characters from the second string, while respecting 8 | the order in which these characters appear in the second string. 9 | 10 | If it's possible, the program displays the string, followed by a \n, otherwise 11 | it simply displays a \n. 12 | 13 | If the number of arguments is not 2, the program displays a \n. 14 | 15 | Examples: 16 | 17 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e 18 | faya$ 19 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e 20 | $ 21 | $>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e 22 | quarante deux$ 23 | $>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e 24 | $ 25 | $>./wdmatch | cat -e 26 | $ 27 | -------------------------------------------------------------------------------- /level/1-0-ulstr/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ulstr 2 | Expected files : ulstr.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and reverses the case of all its letters. 7 | Other characters remain unchanged. 8 | 9 | You must display the result followed by a '\n'. 10 | 11 | If the number of arguments is not 1, the program displays '\n'. 12 | 13 | Examples : 14 | 15 | $>./ulstr "L'eSPrit nE peUt plUs pRogResSer s'Il staGne et sI peRsIsTent VAnIte et auto-justification." | cat -e 16 | l'EspRIT Ne PEuT PLuS PrOGrESsER S'iL STAgNE ET Si PErSiStENT vaNiTE ET AUTO-JUSTIFICATION.$ 17 | $>./ulstr "S'enTOuRer dE sECreT eSt uN sIGnE De mAnQuE De coNNaiSSanCe. " | cat -e 18 | s'ENtoUrER De SecREt EsT Un SigNe dE MaNqUe dE COnnAIssANcE. $ 19 | $>./ulstr "3:21 Ba tOut moUn ki Ka di KE m'en Ka fe fot" | cat -e 20 | 3:21 bA ToUT MOuN KI kA DI ke M'EN kA FE FOT$ 21 | $>./ulstr | cat -e 22 | $ 23 | -------------------------------------------------------------------------------- /level/3-0-hidenp/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : hidenp 2 | Fisiere de iesire : hidenp.c 3 | Functii autorizae : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program numit hidenp ce ia ca parametru doua siruri de caractere si 7 | care afiseaza 1 urmat de '\n' daca primul sir este inclus in cel de-al doilea. 8 | In caz contrar se va afisa 0 urmat de '\n'. 9 | 10 | Fie s1 si s2 doua siruri de caractere. Spunem ca sirul s1 este inclus in sirul 11 | s2 daca putem gasi fiecare caracter al sirului s1 in s2 si acestea sa fie in 12 | aceeasi ordine ca in sirul s1. Mai mult, sirul vid este inclus in orice sir. 13 | 14 | Daca numarul de parametri transmis este diferit de 2, programul vaafisa '\n'. 15 | 16 | Exemple : 17 | 18 | $>./hidenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e 19 | 1$ 20 | $>./hidenp "abc" "2altrb53c.sse" | cat -e 21 | 1$ 22 | $>./hidenp "abc" "btarc" | cat -e 23 | 0$ 24 | $>./hidenp | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /level/5-2-ft_itoa_base/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa_base 2 | Expected files : ft_itoa_base.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un int et le convertit en chaîne terminée par un 7 | caractère nul, en utilisant la base passée en paramètre. Cette fonction 8 | retourne le résultat en tant qu'un tableau de char que vous devez allouer. 9 | 10 | La base est exprimée par un entier qui va de 2 à 16. Les caractères composant 11 | la base sont les chiffres de 0 à 9 suivis par les lettres majuscules A à F. 12 | 13 | Par exemple, la base 4 serait "0123" et la base 16 "0123456789ABCDEF". 14 | 15 | Si la base est 10 et la valeur est négative, la chaîne de sortie doit être 16 | précédée d'un caractère '-'. Pour toute autre base, la valeur est toujours 17 | considérée non-signée. 18 | 19 | Votre fonction doit être déclarée comme suit: 20 | 21 | char *ft_itoa_base(int value, int base); 22 | -------------------------------------------------------------------------------- /Exam02/5-0-ft_itoa_base/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa_base 2 | Expected files : ft_itoa_base.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un int et le convertit en chaîne terminée par un 7 | caractère nul, en utilisant la base passée en paramètre. Cette fonction 8 | retourne le résultat en tant qu'un tableau de char que vous devez allouer. 9 | 10 | La base est exprimée par un entier qui va de 2 à 16. Les caractères composant 11 | la base sont les chiffres de 0 à 9 suivis par les lettres majuscules A à F. 12 | 13 | Par exemple, la base 4 serait "0123" et la base 16 "0123456789ABCDEF". 14 | 15 | Si la base est 10 et la valeur est négative, la chaîne de sortie doit être 16 | précédée d'un caractère '-'. Pour toute autre base, la valeur est toujours 17 | considérée non-signée. 18 | 19 | Votre fonction doit être déclarée comme suit: 20 | 21 | char *ft_itoa_base(int value, int base); 22 | -------------------------------------------------------------------------------- /ExamFinal/5-1-ft_itoa_base/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : ft_itoa_base 2 | Expected files : ft_itoa_base.c 3 | Allowed functions: malloc 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire une fonction qui prend un int et le convertit en chaîne terminée par un 7 | caractère nul, en utilisant la base passée en paramètre. Cette fonction 8 | retourne le résultat en tant qu'un tableau de char que vous devez allouer. 9 | 10 | La base est exprimée par un entier qui va de 2 à 16. Les caractères composant 11 | la base sont les chiffres de 0 à 9 suivis par les lettres majuscules A à F. 12 | 13 | Par exemple, la base 4 serait "0123" et la base 16 "0123456789ABCDEF". 14 | 15 | Si la base est 10 et la valeur est négative, la chaîne de sortie doit être 16 | précédée d'un caractère '-'. Pour toute autre base, la valeur est toujours 17 | considérée non-signée. 18 | 19 | Votre fonction doit être déclarée comme suit: 20 | 21 | char *ft_itoa_base(int value, int base); 22 | -------------------------------------------------------------------------------- /level/1-1-rot_13/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rot_13 2 | Expected files : rot_13.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme nommé rotone, qui prend en paramètre une chaîne de 7 | caractères, et qui affiche cette chaîne en remplaçant chaque caractère 8 | alphabétique par le caractère situé 13 caractères plus loin dans l'ordre 9 | alphabétique. 10 | 11 | 'z' devient 'm' et 'Z' devient 'M'. Les majuscules restent des majuscules, les 12 | minuscules restent des minuscules. 13 | 14 | L'affichage se termine toujours par un retour à la ligne. 15 | 16 | Si le nombre de paramètres transmis est différent de 1, le programme affiche 17 | '\n'. 18 | 19 | Exemple: 20 | 21 | $>./rot_13 "abc" 22 | nop 23 | $>./rot_13 "My horse is Amazing." | cat -e 24 | Zl ubefr vf Nznmvat.$ 25 | $>./rot_13 "AkjhZ zLKIJz , 23y " | cat -e 26 | NxwuM mYXVWm , 23l $ 27 | $>./rot_13 | cat -e 28 | $ 29 | $> 30 | $>./rot_13 "" | cat -e 31 | $ 32 | $> 33 | -------------------------------------------------------------------------------- /ExamFinal/5-0-brainfuck/rendu/brainfuck.h: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* brainfuck.h :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: exam +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2015/09/26 13:10:13 by exam #+# #+# */ 9 | /* Updated: 2015/09/26 13:10:42 by exam ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #ifndef BRAINFUCK_H 14 | # define BRAINFUCK_H 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /level/3-0-epur_str/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : epur_str 2 | Expected files : epur_str.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string, and displays this string with exactly one 7 | space between words, with no spaces or tabs either at the beginning or the end, 8 | followed by a \n. 9 | 10 | A "word" is defined as a part of a string delimited either by spaces/tabs, or 11 | by the start/end of the string. 12 | 13 | If the number of arguments is not 1, or if there are no words to display, the 14 | program displays \n. 15 | 16 | Example: 17 | 18 | $> ./epur_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 19 | vous voyez c'est facile d'afficher la meme chose$ 20 | $> ./epur_str " seulement la c'est plus dur " | cat -e 21 | seulement la c'est plus dur$ 22 | $> ./epur_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 23 | $ 24 | $> ./epur_str "" | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /level/3-0-hidenp/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : hidenp 2 | Expected files : hidenp.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme nommé hidenp qui prend en paramètres deux chaînes de 7 | caractères et qui affiche 1 suivi de '\n' si la première chaîne est cachée dans 8 | la deuxième chaîne. Sinon il affiche 0 suivi de '\n'. 9 | 10 | Soit s1 et s2 des chaînes de caractères. On dit que la chaîne s1 est cachée 11 | dans la chaîne s2 si on peut trouver chaque caractère de s1 dans s2 et ce dans 12 | le même ordre que dans s1. En outre, la chaîne vide est cachée dans n'importe 13 | quelle chaîne. 14 | 15 | Si le nombre de paramètres transmis est différent de 2, le programme affiche 16 | '\n'. 17 | 18 | Exemples : 19 | 20 | $>./hidenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e 21 | 1$ 22 | $>./hidenp "abc" "2altrb53c.sse" | cat -e 23 | 1$ 24 | $>./hidenp "abc" "btarc" | cat -e 25 | 0$ 26 | $>./hidenp | cat -e 27 | $ 28 | $> 29 | -------------------------------------------------------------------------------- /level/2-4-do_op/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : do_op 2 | Expected files : *.c, *.h 3 | Allowed functions: atoi, printf, write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes three strings: 7 | - The first and the third one are representations of base-10 signed integers 8 | that fit in an int. 9 | - The second one is an arithmetic operator chosen from: + - * / % 10 | 11 | The program must display the result of the requested arithmetic operation, 12 | followed by a newline. If the number of parameters is not 3, the program 13 | just displays a newline. 14 | 15 | You can assume the string have no mistakes or extraneous characters. Negative 16 | numbers, in input or output, will have one and only one leading '-'. The 17 | result of the operation fits in an int. 18 | 19 | Examples: 20 | 21 | $> ./do_op "123" "*" 456 | cat -e 22 | 56088$ 23 | $> ./do_op "9828" "/" 234 | cat -e 24 | 42$ 25 | $> ./do_op "1" "+" "-43" | cat -e 26 | -42$ 27 | $> ./do_op | cat -e 28 | $ 29 | -------------------------------------------------------------------------------- /level/2-3-wdmatch/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : wdmatch 2 | Fisiere de iesire : wdmatch.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Programul ia ca parametrii doua siruri de caractere si verifica si verifica 7 | daca este posibila scrierea primului sir de caractere cu ajutorul caracterelor 8 | celui de al doilea sir, respectand ordinea caracterelor din cel de al doilea sir. 9 | 10 | Daca aceast lucru este posibil, programul va afisa primul sir de caractere urmat 11 | de '\n'. In caz contrar programul va afisa doar '\n'. 12 | 13 | Daca numarul de parametri este diferit de 2, programul va afisa '\n'. 14 | 15 | Exemple: 16 | 17 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e 18 | faya$ 19 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e 20 | $ 21 | $>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e 22 | quarante deux$ 23 | $>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e 24 | $ 25 | $>./wdmatch | cat -e 26 | $ 27 | -------------------------------------------------------------------------------- /Exam01/0-0-only_a/rendu/only_a.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* only_a.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: adespond +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2015/09/11 17:06:30 by adespond #+# #+# */ 9 | /* Updated: 2015/09/11 17:10:40 by exam ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | int main(void) 16 | { 17 | write(1, "a", 1); 18 | return (0); 19 | } 20 | -------------------------------------------------------------------------------- /Exam01/3-0-expand_str/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : expand_str 2 | Expected files : expand_str.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays it with exactly three spaces 7 | between each word, with no spaces or tabs either at the beginning or the end, 8 | followed by a newline. 9 | 10 | A word is a section of string delimited either by spaces/tabs, or by the 11 | start/end of the string. 12 | 13 | If the number of parameters is not 1, or if there are no words, simply display 14 | a newline. 15 | 16 | Examples: 17 | 18 | $> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 19 | vous voyez c'est facile d'afficher la meme chose$ 20 | $> ./expand_str " seulement la c'est plus dur " | cat -e 21 | seulement la c'est plus dur$ 22 | $> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 23 | $ 24 | $> ./expand_str "" | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /level/3-1-expand_str/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : expand_str 2 | Expected files : expand_str.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes a string and displays it with exactly three spaces 7 | between each word, with no spaces or tabs either at the beginning or the end, 8 | followed by a newline. 9 | 10 | A word is a section of string delimited either by spaces/tabs, or by the 11 | start/end of the string. 12 | 13 | If the number of parameters is not 1, or if there are no words, simply display 14 | a newline. 15 | 16 | Examples: 17 | 18 | $> ./expand_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 19 | vous voyez c'est facile d'afficher la meme chose$ 20 | $> ./expand_str " seulement la c'est plus dur " | cat -e 21 | seulement la c'est plus dur$ 22 | $> ./expand_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 23 | $ 24 | $> ./expand_str "" | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /Training/level1/ft_swap.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_swap.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: luman +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/02/22 21:12:23 by luman #+# #+# */ 9 | /* Updated: 2018/02/22 21:14:19 by luman ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_swap(int *a, int *b) 14 | { 15 | int *tmp; 16 | 17 | tmp = *a; 18 | *a = *b; 19 | *b = tmp; 20 | } 21 | -------------------------------------------------------------------------------- /level/4-3-sort_list/list.h: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* list.h :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: zaz +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2014/02/27 13:14:10 by zaz #+# #+# */ 9 | /* Updated: 2014/02/27 13:15:29 by zaz ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | typedef struct s_list t_list; 14 | 15 | struct s_list 16 | { 17 | int data; 18 | t_list *next; 19 | }; 20 | -------------------------------------------------------------------------------- /Exam00/3-2-ft_swap/rendu/ft_swap.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_swap.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: adespond +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2015/09/04 19:06:43 by adespond #+# #+# */ 9 | /* Updated: 2015/09/04 19:07:32 by exam ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | void ft_swap(int *a, int *b) 14 | { 15 | int tmp; 16 | 17 | tmp = *b; 18 | *b = *a; 19 | *a = tmp; 20 | } 21 | -------------------------------------------------------------------------------- /Exam01/4-0-rostring/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitii : rostring 2 | Fisiere de iesire : rostring.c 3 | Functii de iesire : write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza acest 7 | sir procedand la rotirea unui cuvant de la dreapta la stanga. 8 | 9 | Astfel, primul cuvant va deveni ultimul, iar celelalte vor ramane in aceeasi ordine. 10 | 11 | Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau 12 | tabulatoare, fie de inceputul/sfarsitul sirului. 13 | 14 | Cuvintele vor fi afisate, separate de un singur spatiu. 15 | 16 | Daca numarul de parametri este inferior lui 1, programul va trebui sa afiseze '\n'. 17 | 18 | Exemplu: 19 | 20 | $>./rostring "abc " | cat -e 21 | abc$ 22 | $> 23 | $>./rostring "Que la lumiere soit et la lumiere fut" 24 | la lumiere soit et la lumiere fut Que 25 | $> 26 | $>./rostring " AkjhZ zLKIJz , 23y" 27 | zLKIJz , 23y AkjhZ 28 | $> 29 | $>./rostring | cat -e 30 | $ 31 | $> 32 | -------------------------------------------------------------------------------- /ExamFinal/0-0-hello/rendu/hello.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* hello.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: exam +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2015/09/26 10:05:44 by exam #+# #+# */ 9 | /* Updated: 2015/09/26 10:06:58 by exam ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | int main(void) 16 | { 17 | write(1, "Hello World!\n", 13); 18 | return (0); 19 | } 20 | -------------------------------------------------------------------------------- /level/2-3-wdmatch/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : wdmatch 2 | Expected files : wdmatch.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Le programme prend en paramètres deux chaînes de caractères et vérifie qu'il 7 | est possible d'écrire la première chaîne de caractères a l'aide des caractères 8 | de la deuxiême chaîne, tout en respectant l'ordre des caractères dans la 9 | deuxième chaîne. 10 | 11 | Si cela est possible, le programme affiche la première chaîne de caractères, 12 | suivie de '\n'. Sinon le programme affiche seulement '\n'. 13 | 14 | Si le nombre de paramètres transmis est différent de 2, le programme affiche 15 | '\n'. 16 | 17 | Exemples : 18 | 19 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbreda" | cat -e 20 | faya$ 21 | $>./wdmatch "faya" "fgvvfdxcacpolhyghbred" | cat -e 22 | $ 23 | $>./wdmatch "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " | cat -e 24 | quarante deux$ 25 | $>./wdmatch "error" rrerrrfiiljdfxjyuifrrvcoojh | cat -e 26 | $ 27 | $>./wdmatch | cat -e 28 | $ 29 | -------------------------------------------------------------------------------- /level/4-0-fprime/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : fprime 2 | Fisiere de iesire : fprime.c 3 | Functii autorizate : printf, atoi 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un intreg strict pozitiv si care va afisa 7 | descompunerea in factori primi la iesirea standard, urmat de un '\n'. 8 | 9 | Factorii trebuie sa fie afisati in ordine crescatoare si separati de '*', 10 | astfel incat expresia afisata sa dea rezultatul corect. 11 | 12 | Daca numarul de parametri este diferit de 1, programul va afisa '\n'. 13 | 14 | Parametrul de intrare, cand este transmis, va fi totdeauna un numar valid 15 | fara caractere neconforme. 16 | 17 | Exemplu: 18 | 19 | $> ./fprime 225225 | cat -e 20 | 3*3*5*5*7*11*13$ 21 | $> ./fprime 8333325 | cat -e 22 | 3*3*5*5*7*11*13*37$ 23 | $> ./fprime 9539 | cat -e 24 | 9539$ 25 | $> ./fprime 804577 | cat -e 26 | 804577$ 27 | $> ./fprime 42 | cat -e 28 | 2*3*7$ 29 | $> ./fprime 1 | cat -e 30 | 1$ 31 | $> ./fprime | cat -e 32 | $ 33 | $> ./fprime 42 21 | cat -e 34 | $ 35 | -------------------------------------------------------------------------------- /level/4-1-rev_wstr/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : rev_wstr 2 | Fisiere de iesire : rev_wstr.c 3 | Functii autorizate : write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza acest 7 | sir inversand cuvintele sale. 8 | 9 | Numim "cuvant" o portiune a sirului de caractere delimitat, fie de spatiu si/sau 10 | tabulator, fie de inceputul/sfarsitul sirului. 11 | 12 | Daca numarul de parametri este diferit de 1, programul va afisa '\n'. 13 | 14 | Sirurile ce urmeaza a fi testate nu vor contine spatii nici la inceput si nici 15 | la sfarsitul acestora si ca cuvintele vor fi separate intotdeauna printr-un spatiu. 16 | 17 | Exemplu: 18 | 19 | $> ./rev_wstr "le temps du mepris precede celui de l'indifference" | cat -e 20 | l'indifference de celui precede mepris du temps le$ 21 | $> ./rev_wstr "abcdefghijklm" 22 | abcdefghijklm 23 | $> ./rev_wstr "il contempla le mont" | cat -e 24 | mont le contempla il$ 25 | $> ./rev_wstr | cat -e 26 | $ 27 | $> 28 | -------------------------------------------------------------------------------- /level/4-6-rostring/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitii : rostring 2 | Fisiere de iesire : rostring.c 3 | Functii de iesire : write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza acest 7 | sir procedand la rotirea unui cuvant de la dreapta la stanga. 8 | 9 | Astfel, primul cuvant va deveni ultimul, iar celelalte vor ramane in aceeasi ordine. 10 | 11 | Numim "cuvant" o portiune a sirului de caractere delimitat fie de spatii si/sau 12 | tabulatoare, fie de inceputul/sfarsitul sirului. 13 | 14 | Cuvintele vor fi afisate, separate de un singur spatiu. 15 | 16 | Daca numarul de parametri este inferior lui 1, programul va trebui sa afiseze '\n'. 17 | 18 | Exemplu: 19 | 20 | $>./rostring "abc " | cat -e 21 | abc$ 22 | $> 23 | $>./rostring "Que la lumiere soit et la lumiere fut" 24 | la lumiere soit et la lumiere fut Que 25 | $> 26 | $>./rostring " AkjhZ zLKIJz , 23y" 27 | zLKIJz , 23y AkjhZ 28 | $> 29 | $>./rostring | cat -e 30 | $ 31 | $> 32 | -------------------------------------------------------------------------------- /ExamFinal/4-0-fprime/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : fprime 2 | Fisiere de iesire : fprime.c 3 | Functii autorizate : printf, atoi 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un intreg strict pozitiv si care va afisa 7 | descompunerea in factori primi la iesirea standard, urmat de un '\n'. 8 | 9 | Factorii trebuie sa fie afisati in ordine crescatoare si separati de '*', 10 | astfel incat expresia afisata sa dea rezultatul corect. 11 | 12 | Daca numarul de parametri este diferit de 1, programul va afisa '\n'. 13 | 14 | Parametrul de intrare, cand este transmis, va fi totdeauna un numar valid 15 | fara caractere neconforme. 16 | 17 | Exemplu: 18 | 19 | $> ./fprime 225225 | cat -e 20 | 3*3*5*5*7*11*13$ 21 | $> ./fprime 8333325 | cat -e 22 | 3*3*5*5*7*11*13*37$ 23 | $> ./fprime 9539 | cat -e 24 | 9539$ 25 | $> ./fprime 804577 | cat -e 26 | 804577$ 27 | $> ./fprime 42 | cat -e 28 | 2*3*7$ 29 | $> ./fprime 1 | cat -e 30 | 1$ 31 | $> ./fprime | cat -e 32 | $ 33 | $> ./fprime 42 21 | cat -e 34 | $ 35 | -------------------------------------------------------------------------------- /Training/level1/ft_strlen.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* ft_strlen.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: luman +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2018/02/22 20:59:22 by luman #+# #+# */ 9 | /* Updated: 2018/02/22 21:14:53 by luman ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | int ft_strlen(char *str) 14 | { 15 | int i; 16 | 17 | i = 0; 18 | while (str[i] != '\0') 19 | i++; 20 | return (i); 21 | } 22 | -------------------------------------------------------------------------------- /level/2-4-do_op/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : do_op 2 | Fisiere de iesire : *.c, *.h 3 | Functii autorizate : atoi, printf, write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia caparametru trei siruri de caractere: 7 | 8 | Primul si al treilea sunt reprezentarile in baza 10 a numerelor intregi cu 9 | semn, fiind de tip int. 10 | 11 | Al doilea este format din operator aritmetici: + - * / %. 12 | 13 | Programul trebuie sa afiseze rezultatul operatiei aritmetice solicitate, urmat 14 | de un '\n'. Daca numarul de parameti este diferit de 3, programul va afisa '\n'. 15 | 16 | Puteti porni de la principiul ca sirurile de caractere nu implica erori, si 17 | nici caractere neconforme. Numerele negative de intrare si de iesire vor fi 18 | precedate de un singur semn -. Rezultatul operatiei va fi tot de tip int. 19 | 20 | Exemple: 21 | 22 | $> ./do_op "123" "*" 456 | cat -e 23 | 56088$ 24 | $> ./do_op "9828" "/" 234 | cat -e 25 | 42$ 26 | $> ./do_op "1" "+" "-43" | cat -e 27 | -42$ 28 | $> ./do_op | cat -e 29 | $ 30 | -------------------------------------------------------------------------------- /level/4-6-rostring/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rostring 2 | Expected files : rostring.c 3 | Allowed functions: write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend en paramètre une chaîne de caractères, et qui 7 | affiche cette chaîne en procédant à une rotation d'un mot de droite à gauche. 8 | 9 | Ainsi, le premier mot se retrouver le dernier et les autres restent dans l'ordre. 10 | 11 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 12 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 13 | 14 | Les mots seront affichés séparés par un seul et unique espace. 15 | 16 | Si le nombre de paramètres est inférieur à 1, le programme devra afficher '\n'. 17 | 18 | Exemple: 19 | 20 | $>./rostring "abc " | cat -e 21 | abc$ 22 | $> 23 | $>./rostring "Que la lumiere soit et la lumiere fut" 24 | la lumiere soit et la lumiere fut Que 25 | $> 26 | $>./rostring " AkjhZ zLKIJz , 23y" 27 | zLKIJz , 23y AkjhZ 28 | $> 29 | $>./rostring | cat -e 30 | $ 31 | $> 32 | -------------------------------------------------------------------------------- /Exam01/4-0-rostring/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rostring 2 | Expected files : rostring.c 3 | Allowed functions: write, malloc, free 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend en paramètre une chaîne de caractères, et qui 7 | affiche cette chaîne en procédant à une rotation d'un mot de droite à gauche. 8 | 9 | Ainsi, le premier mot se retrouver le dernier et les autres restent dans l'ordre. 10 | 11 | On appelle "mot" une portion de chaîne de caractères délimitée soit par des 12 | espaces et/ou des tabulations, soit par le début / fin de la chaîne. 13 | 14 | Les mots seront affichés séparés par un seul et unique espace. 15 | 16 | Si le nombre de paramètres est inférieur à 1, le programme devra afficher '\n'. 17 | 18 | Exemple: 19 | 20 | $>./rostring "abc " | cat -e 21 | abc$ 22 | $> 23 | $>./rostring "Que la lumiere soit et la lumiere fut" 24 | la lumiere soit et la lumiere fut Que 25 | $> 26 | $>./rostring " AkjhZ zLKIJz , 23y" 27 | zLKIJz , 23y AkjhZ 28 | $> 29 | $>./rostring | cat -e 30 | $ 31 | $> 32 | -------------------------------------------------------------------------------- /level/1-0-ulstr/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : ulstr 2 | Fisiere de iesire : ulstr.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru u sir de caractere si care transforma toate 7 | literele minuscule in majuscule si toate literele majuscule in minuscule. Restul 8 | caracterelor vor ramane nemodificate. 9 | 10 | Trebuie sa afisati resultatul urmat de un '\n'. 11 | 12 | Daca numarul de parametri transmis este diferit de 1, programul va afisa '\n'. 13 | 14 | Exemple: 15 | 16 | $>./ulstr "L'eSPrit nE peUt plUs pRogResSer s'Il staGne et sI peRsIsTent VAnIte et auto-justification." | cat -e 17 | l'EspRIT Ne PEuT PLuS PrOGrESsER S'iL STAgNE ET Si PErSiStENT vaNiTE ET AUTO-JUSTIFICATION.$ 18 | $>./ulstr "S'enTOuRer dE sECreT eSt uN sIGnE De mAnQuE De coNNaiSSanCe. " | cat -e 19 | s'ENtoUrER De SecREt EsT Un SigNe dE MaNqUe dE COnnAIssANcE. $ 20 | $>./ulstr "3:21 Ba tOut moUn ki Ka di KE m'en Ka fe fot" | cat -e 21 | 3:21 bA ToUT MOuN KI kA DI ke M'EN kA FE FOT$ 22 | $>./ulstr | cat -e 23 | $ 24 | -------------------------------------------------------------------------------- /level/3-0-epur_str/subject.ro.txt: -------------------------------------------------------------------------------- 1 | Exercitiu : epur_str 2 | Fisiere de iesire : epur_str.c 3 | Functii autorizate : write 4 | -------------------------------------------------------------------------------- 5 | 6 | Scrieti un program ce ia ca parametru un sir de caractere si care afiseaza 7 | acest sir cu un singur spatiu intre fiecare dintre cuvinte si fara spatiu ori 8 | tabulator la inceput si la sfarsitul sirului, urmat de un '\n'}. 9 | 10 | Numim "cuvant" o portiune a sirului de caractere delimitata de spatii sau 11 | tabulatoare, sau la inceputul ori sfarsitul sirului. 12 | 13 | Daca numarul de parametri trasnmis este diferit de 1, sau nu exista niciun 14 | cuvant de afisat, programul va afisa '\n'. 15 | 16 | Exemplu: 17 | 18 | $> ./epur_str "vous voyez c'est facile d'afficher la meme chose" | cat -e 19 | vous voyez c'est facile d'afficher la meme chose$ 20 | $> ./epur_str " seulement la c'est plus dur " | cat -e 21 | seulement la c'est plus dur$ 22 | $> ./epur_str "comme c'est cocasse" "vous avez entendu, Mathilde ?" | cat -e 23 | $ 24 | $> ./epur_str "" | cat -e 25 | $ 26 | $> 27 | -------------------------------------------------------------------------------- /Exam00/0-0-only_z/rendu/only_z.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************** */ 2 | /* */ 3 | /* ::: :::::::: */ 4 | /* only_z.c :+: :+: :+: */ 5 | /* +:+ +:+ +:+ */ 6 | /* By: adespond +#+ +:+ +#+ */ 7 | /* +#+#+#+#+#+ +#+ */ 8 | /* Created: 2015/09/04 17:09:06 by adespond #+# #+# */ 9 | /* Updated: 2015/09/04 17:15:44 by exam ### ########.fr */ 10 | /* */ 11 | /* ************************************************************************** */ 12 | 13 | #include 14 | 15 | int main(void) 16 | { 17 | char lettre; 18 | 19 | lettre = 'z'; 20 | write(1, &lettre, 1); 21 | return (0); 22 | } 23 | -------------------------------------------------------------------------------- /level/3-0-rstr_capitalizer/subject.en.txt: -------------------------------------------------------------------------------- 1 | Assignment name : rstr_capitalizer 2 | Expected files : rstr_capitalizer.c 3 | Allowed functions: write 4 | -------------------------------------------------------------------------------- 5 | 6 | Write a program that takes one or more strings and, for each argument, puts 7 | the last character of each word (if it's a letter) in uppercase and the rest 8 | in lowercase, then displays the result followed by a \n. 9 | 10 | A word is a section of string delimited by spaces/tabs or the start/end of the 11 | string. If a word has a single letter, it must be capitalized. 12 | 13 | If there are no parameters, display \n. 14 | 15 | Examples: 16 | 17 | $> ./rstr_capitalizer | cat -e 18 | $ 19 | $> ./rstr_capitalizer "Premier PETIT TesT" | cat -e 20 | premieR petiT tesT$ 21 | $> ./rstr_capitalizer "DeuxiEmE tEST uN PEU moinS facile" " attention C'EST pas dur QUAND mEmE" "ALLer UN DeRNier 0123456789pour LA rouTE E " | cat -e 22 | deuxiemE tesT uN peU moinS facilE$ 23 | attentioN c'esT paS duR quanD memE$ 24 | alleR uN dernieR 0123456789pouR lA routE E $ 25 | $> 26 | -------------------------------------------------------------------------------- /level/4-0-fprime/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : fprime 2 | Expected files : fprime.c 3 | Allowed functions: printf, atoi 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend en paramètre un entier strictement positif, et 7 | qui affiche sa décomposition en facteurs premiers sur la sortie standard, 8 | suivie d'un '\n'. 9 | 10 | Les facteurs doivent être affichés dans l'ordre croissant et séparés par des 11 | '*', de telle sorte que l'expression affichée donne le bon résultat. 12 | 13 | Si le nombre de paramètres est différent de 1, le programme doit afficher '\n'. 14 | 15 | L'entrée, quand elle est passée, sera toujours un nombre valide sans caractères 16 | parasites. 17 | 18 | Exemple: 19 | 20 | $> ./fprime 225225 | cat -e 21 | 3*3*5*5*7*11*13$ 22 | $> ./fprime 8333325 | cat -e 23 | 3*3*5*5*7*11*13*37$ 24 | $> ./fprime 9539 | cat -e 25 | 9539$ 26 | $> ./fprime 804577 | cat -e 27 | 804577$ 28 | $> ./fprime 42 | cat -e 29 | 2*3*7$ 30 | $> ./fprime 1 | cat -e 31 | 1$ 32 | $> ./fprime | cat -e 33 | $ 34 | $> ./fprime 42 21 | cat -e 35 | $ 36 | -------------------------------------------------------------------------------- /Exam00/0-0-only_z/0-0-only_z.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e1r10p19.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 4 17:19:24 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = only_z ======================================================================= 21 | $> clang -Wextra -Wall -Werror only_z.c -o user_exe 22 | 23 | = Test 1 =================================================== 24 | $> ./5bl96gp4tei76o25djokwax2 25 | $> diff -U 3 user_output_test1 test1.output | cat -e 26 | 27 | Diff OK :D 28 | Grade: 1 29 | 30 | = Final grade: 1 =============================================================== 31 | -------------------------------------------------------------------------------- /Exam01/0-0-only_a/0-0-only_a.trace.txt: -------------------------------------------------------------------------------- 1 | = Host information ============================================================= 2 | $> hostname; uname -msr 3 | e2r8p8.42.fr 4 | Darwin 14.5.0 x86_64 5 | 6 | $> date 7 | Fri Sep 11 17:12:10 CEST 2015 8 | 9 | $> gcc --version 10 | Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 11 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 12 | Target: x86_64-apple-darwin14.5.0 13 | Thread model: posix 14 | 15 | $> clang --version 16 | Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) 17 | Target: x86_64-apple-darwin14.5.0 18 | Thread model: posix 19 | 20 | = only_a ======================================================================= 21 | $> clang -Wextra -Wall -Werror only_a.c -o user_exe 22 | 23 | = Test 1 =================================================== 24 | $> ./5onvxhg8zimazapkp61d01ft 25 | $> diff -U 3 user_output_test1 test1.output | cat -e 26 | 27 | Diff OK :D 28 | Grade: 1 29 | 30 | = Final grade: 1 =============================================================== 31 | -------------------------------------------------------------------------------- /ExamFinal/4-0-fprime/subject.fr.txt: -------------------------------------------------------------------------------- 1 | Assignment name : fprime 2 | Expected files : fprime.c 3 | Allowed functions: printf, atoi 4 | -------------------------------------------------------------------------------- 5 | 6 | Écrire un programme qui prend en paramètre un entier strictement positif, et 7 | qui affiche sa décomposition en facteurs premiers sur la sortie standard, 8 | suivie d'un '\n'. 9 | 10 | Les facteurs doivent être affichés dans l'ordre croissant et séparés par des 11 | '*', de telle sorte que l'expression affichée donne le bon résultat. 12 | 13 | Si le nombre de paramètres est différent de 1, le programme doit afficher '\n'. 14 | 15 | L'entrée, quand elle est passée, sera toujours un nombre valide sans caractères 16 | parasites. 17 | 18 | Exemple: 19 | 20 | $> ./fprime 225225 | cat -e 21 | 3*3*5*5*7*11*13$ 22 | $> ./fprime 8333325 | cat -e 23 | 3*3*5*5*7*11*13*37$ 24 | $> ./fprime 9539 | cat -e 25 | 9539$ 26 | $> ./fprime 804577 | cat -e 27 | 804577$ 28 | $> ./fprime 42 | cat -e 29 | 2*3*7$ 30 | $> ./fprime 1 | cat -e 31 | 1$ 32 | $> ./fprime | cat -e 33 | $ 34 | $> ./fprime 42 21 | cat -e 35 | $ 36 | --------------------------------------------------------------------------------