mohammadbutt / 42_Exams-C-beginner

Solutions of the C beginner exam at 42 Silicon Valley

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

42_Exams-C

Solutions of the C beginner exam at 42 Silicon Valley. More solutions to come

Beginner

Show Level 0 Questions
Problems/Subjects Code
aff_a πŸ“–
aff_first_param πŸ“–
aff_last_param πŸ“–
aff_z πŸ“–
ft_countdown πŸ“–
ft_print_numbers πŸ“–
hello πŸ“–
maff_alpha πŸ“–
maff_revalpha πŸ“–
only_a πŸ“–
only_z πŸ“–

Show Level 1 Questions
Problems/Subjects Code
first_word πŸ“–
fizz_buzz πŸ“–
ft_putstr πŸ“–
ft_strcpy πŸ“–
ft_strlen πŸ“–
ft_swap πŸ“–
repeat_alpha πŸ“–
rev_print πŸ“–
rot_13 πŸ“–
rotone πŸ“–
search_and_replace πŸ“–
ulstr πŸ“–

Show Level 2 Questions
Problems/Subjects Code
alpha_mirror πŸ“–
do_op πŸ“–
ft_atoi πŸ“–
ft_strcmp πŸ“–
ft_strcspn πŸ“–
ft_strdup πŸ“–
ft_strpbrk πŸ“–
ft_strrev πŸ“–
ft_strspn πŸ“–
inter πŸ“–
is_power_of_2 πŸ“–
last_word πŸ“–
max πŸ“–
print_bits πŸ“–
reverse_bits πŸ“–
snake_to_camel πŸ“–
swap_bits πŸ“–
union πŸ“–
wdmatch πŸ“–

Show Level 3 Questions
Problems/Subjects Code
add_prime_sum πŸ“–
epur_str πŸ“–
expand_str πŸ“–
ft_atoi_base ❓
ft_list_size πŸ“– πŸ“œ
ft_range πŸ“–
ft_rrange πŸ“–
hidenp πŸ“–
lcm πŸ“–
paramsum πŸ“–
pgcd πŸ“–
print_hex πŸ“–
rstr_capitalizer πŸ“–
str_capitalizer πŸ“–
tab_mult πŸ“–

Show Level 4 Questions
Problems/Subjects Code
fprime πŸ“–
ft_itoa πŸ“–
ft_list_foreach πŸ“– πŸ“œ
ft_list_remove_if ❌ ❌
ft_split πŸ“– πŸ“š
rev_wstr πŸ“–
rostring πŸ“–
sort_int_tab πŸ“–
sort_list πŸ“œ ❌

Show Level 5 Questions
Problems/Subjects Code
brackets πŸ“–
brainfuck ❌
check_mate ❌
ft_itoa_base πŸ“–
options ❓
print_memory ❌
rpn_calc πŸ“–

Debug using LLDB

gcc filename.c -g
lldb a.out
b main
run
gui

pressing s each time will progress the program 1 step forward.

Find Segmentation fault using LLDB

gcc filename.c
lldb ./a.out
run

This will likely show assembly code, but it will show the name of the function which is causing segmentation fault. Files can be compiled mannually to see the source code in C that is causing segmentation fault. When I figure that out I will post it.

About

Solutions of the C beginner exam at 42 Silicon Valley


Languages

Language:C 100.0%