How laghazar/1337-piscine-42 works
Purpose and Repository Shape
This is a personal 42/1337 June 2021 Piscine solution archive, not a unified application. It organizes independent C and shell exercises by curriculum day (C00–C13), timed-exam practice (EXAM00–EXAM03), and a Rush project. Each exercise is normally self-contained and compiled/run separately.
Entry Points and Execution Model
Most C exercises expose a single ft_* implementation; many have adjacent local driver programs for manual validation, e.g. C00/ex00/ft_putchar.c and C00/ex00/ft_putchar_main.c. Command-line exercises own their executable entry point directly, such as C06/ex00/ft_print_program_name.c. Shell exercises are directly executable scripts/files under Shell00 and Shell01, e.g. Shell01/ex02/find_sh.sh.
Foundational C Exercise Progression
Early directories establish low-level language primitives: character output and loops in C00/ex08/ft_print_combn.c; pointer, array, and mutation operations in C01/ex08/ft_sort_int_tab.c; and string copy, classification, casing, and byte formatting in C02/ex12/ft_print_memory.c. These are independent implementations rather than shared dependencies.
String, Numeric, and Allocation Layer
Middle exercises implement common C-style routines: comparisons and concatenation under C03/ex05/ft_strlcat.c, parsing/base conversion under C04/ex05/ft_atoi_base.c, and iterative/recursive math algorithms under C05/ex07/ft_find_next_prime.c. Heap allocation and derived string/array structures are introduced in C07/ex02/ft_ultimate_range.c, C07/ex03/ft_strjoin.c, and C07/ex05/ft_split.c. Ownership and freeing are local to each exercise’s contract.
Interfaces, Libraries, and Builds
Header-based type/API boundaries appear in C08/ex04/ft_stock_str.h with its structure producer C08/ex04/ft_strs_to_tab.c, and in C08/ex05/ft_stock_str.h with renderer C08/ex05/ft_show_tab.c. C09 evolves standalone utility sources into library packaging: C09/ex00/libft_creator.sh and the Make-based layout in C09/ex01/Makefile, C09/ex01/includes/ft.h, and C09/ex01/srcs/. Standard C compilation and Make are the material build infrastructure; no external runtime services are present.
Higher-Order and Data-Structure Components
Function-pointer control flow is exercised through collection traversal, mapping, and predicates in C11/ex00/ft_foreach.c, C11/ex01/ft_map.c, and C11/ex04/ft_is_sort.c. The calculator is a multi-source command-line program with operator dispatch and arithmetic implementations: C11/ex05/srcs/do-op.c, C11/ex05/srcs/do_op.h, and C11/ex05/Makefile. Linked-list operations share an exercise-local t_list contract, e.g. C12/ex12/ft_list.h and C12/ex12/ft_list_remove_if.c; binary-tree traversal and search use analogous t_btree headers in C13/ex05/ft_btree.h and C13/ex07/btree_apply_by_level.c.
Practice and Project Boundaries
Exam folders package isolated prompt-specific submissions with their subject text, e.g. EXAM02/6-ft_split/ft_split.c and EXAM02/6-ft_split/subject.en.txt; they do not integrate with curriculum implementations. Rush00 is the main multi-file procedural program: Rush00/ex00/main.c drives selectable pattern functions in Rush00/ex00/rush00.c through Rush00/ex00/rush04.c, using Rush00/ex00/ft_putchar.c for output. Curriculum PDFs and exam subject files define requirements externally, under subjects/ and each exam directory.
Main entry points: ft_list_remove_if.c Linked-list operations · ft_sort_int_tab.c Pointers & arrays · ft_print_memory.c String primitives · ft_strlcat.c String composition
Components 22
Curriculum Exercises
Independent C exercises organized by day.
- Output & loops
C00/ex08/ft_print_combn.c - Pointers & arrays
C01/ex08/ft_sort_int_tab.c - String primitives
C02/ex12/ft_print_memory.c - String composition
C03/ex05/ft_strlcat.c - Parsing & bases
C04/ex05/ft_atoi_base.c - Math algorithms
C05/ex07/ft_find_next_prime.c - Allocation routines · Locally owned dynamic strings and arrays.
C07/ex05/ft_split.c
Interfaces & Builds
Header contracts and library packaging exercises.
- Stock-string API · Defines the shared structure contract.
C08/ex04/ft_stock_str.h - Structure producer
C08/ex04/ft_strs_to_tab.c - Structure renderer
C08/ex05/ft_show_tab.c - Library creator
C09/ex00/libft_creator.sh - Make library layout · Builds utility sources through a public header.
C09/ex01/Makefile
Higher-Order & Structures
Function-pointer, calculator, list, and tree exercises.
- Callback collections · Traversal, mapping, and predicate patterns.
C11/ex01/ft_map.c - do-op calculator · Multi-source arithmetic command-line program.
C11/ex05/srcs/do-op.c - Linked-list operations
C12/ex12/ft_list_remove_if.c - t_list contract
C12/ex12/ft_list.h - Binary-tree traversal
C13/ex07/btree_apply_by_level.c - t_btree contract
C13/ex05/ft_btree.h
Practice & Projects
Exam submissions and the Rush program.
- Exam ft_split submission · Prompt-specific practice implementation.
EXAM02/6-ft_split/ft_split.c - Rush00 entry point · Selects and runs a pattern.
Rush00/ex00/main.c - Rush patterns
Rush00/ex00/rush00.c - Character output
Rush00/ex00/ft_putchar.c
Connections 17
- Output & loops → Pointers & arrays: curriculum progression
- Pointers & arrays → String primitives: curriculum progression
- String primitives → String composition: curriculum progression
- String composition → Parsing & bases: curriculum progression
- Parsing & bases → Math algorithms: curriculum progression
- Math algorithms → Allocation routines: curriculum progression
- Structure producer → Stock-string API: uses contract
- Structure renderer → Stock-string API: uses contract
- Library creator → Make library layout: library packaging progression
- Callback collections → do-op calculator: C11 progression
- do-op calculator → Linked-list operations: curriculum progression
- Linked-list operations → t_list contract: uses t_list
- Linked-list operations → Binary-tree traversal: curriculum progression
- Binary-tree traversal → t_btree contract: uses t_btree
- Exam ft_split submission → Allocation routines: similar isolated prompt
- Rush00 entry point → Rush patterns: selects pattern
- Rush patterns → Character output: prints through