ft_print_hex
shawnteh1711 opened this issue · comments
May I know what is the usage of the ft_putchar_fd((num - 10 + 'a'), 1); in the ft_put_hex function?
it is for put the numbers:
10, 11, 12, 13, 14, 15 (from hexadecimal)
to:
a, b, c, d, e, f.
So, for example, it is 10;
10 - 10 = 0,
0 + 'a' = 'a'
Got it. Thank you.
I am so sorry! I did not see your question before.
Thank you gjmacias for your answer.