This repository contains my solutions and test programs for 42 C Piscine & exam preparation.
exercises/
├── aff_first_param/
├── aff_last_param/
├── count_alpha/
├── count_island/
├── even/
├── first_word/
├── ft_add/
├── ft_atoi/
├── ft_countdown/
├── ft_dec/
├── ft_ft/
├── ft_inc/
├── ft_itoa/
├── ft_list_foreach/
├── ft_list_push_back/
├── ft_list_remove_if/
├── ft_list_size/
├── ft_mul/
├── ft_print_list/
├── ft_print_numbers/
├── ft_putnbr/
├── ft_range/
├── ft_rrange/
├── ft_split/
├── ft_star/
├── ft_strcmp/
├── ft_strcpy/
├── ft_strrev/
├── ft_sub/
├── ft_swap/
├── hello/
├── inc_elem/
├── inter/
├── is_palindrome/
├── maff_alpha/
├── maff_revalpha/
└── tests/
├── test_big_number_multiply.c
├── test_ft_add.c
├── test_ft_atoi.c
├── test_ft_dec.c
├── test_ft_inc.c
├── test_ft_itoa.c
├── test_ft_list_remove_if.c
├── test_ft_list_size.c
├── test_ft_mul.c
├── test_ft_print_numbers.c
├── test_ft_putnbr.c
├── test_ft_putstr.c
├── test_ft_range.c
├── test_ft_rrange.c
├── test_ft_split.c
├── test_ft_strcmp.c
├── test_ft_strcpy.c
├── test_ft_strlen.c
├── test_ft_strrev.c
├── test_ft_sub.c
├── test_ft_swap.c
├── test_graph_diameter.c
├── test_ord_alphlong.c
├── test_sort_list.c
├── test_swap_cases.c
└── test_occurrence_counter.c
Each file in exercises/tests/ is a standalone main() to test one or more functions:
test_ft_add.c→ testsft_addtest_ft_atoi.c→ testsft_atoitest_ft_range.c→ testsft_rangetest_ft_rrange.c→ testsft_rrangetest_ft_split.c→ testsft_splittest_ft_strcmp.c→ testsft_strcmptest_ft_strcpy.c→ testsft_strcpytest_ft_strrev.c→ testsft_strrevtest_ft_sub.c→ testsft_subtest_ft_swap.c→ testsft_swaptest_ft_dec.c→ testsft_dectest_ft_inc.c→ testsft_inctest_ft_mul.c→ testsft_multest_ft_itoa.c→ testsft_itoatest_ft_strlen.c→ testsft_strlentest_ft_putnbr.c→ testsft_putnbrtest_ft_putstr.c→ testsft_putstrtest_ft_print_numbers.c→ testsft_print_numberstest_ord_alphlong.c→ testsord_alphlong(word sorting)test_sort_list.c→ testssort_list(linked list)test_ft_list_size.c→ testsft_list_sizetest_ft_list_remove_if.c→ testsft_list_remove_iftest_swap_cases.c→ testsswap_casestest_occurrence_counter.c→ tests occurrence countingtest_big_number_multiply.c→ tests big integer multiplicationtest_graph_diameter.c→ tests graph diameter (g_diam)
To compile a specific test:
gcc exercises/tests/test_ft_split.c exercises/ft_split/ft_split.c -o test_split
./test_split "Hello 42 Piscine"