The following converions are handled in this project:
%s
string%u
unsigned decimal%i
integer%d
decimal%p
pointer%x
lower case hexadecimal%X
upper case hexadecimal%c
character%%
percentage
NOTE
: Main file is uploaded to check, test and compare the project conversions outpust to the mainprintf
built-in command
inc
: ft_printf.hsrc
: ft_printf.c ft_character.c ft_string.c ft_putnbr.c ft_hexa.c ft_ pointer.c ft_unsigned.c main.cobj
: ft_printf.o ft_character.o ft_string.o ft_putnbr.o ft_hexa.o ft_ pointer.o ft_unsigned.o main.o
NOTE
: The best way to test your code is by simply comparing your function output withprintf()
outputs as it show below:
In This project the main challenge i faced is to learn and to know how to work with the
variadic functions
. Sense the built-in commandprintf
take infinte number of arguments it was a challenge to figure how to implement the same function in my code, and the variadic functions were the answere. Implementingva_start()
,va_arg()
andva_end()
gave my function the ability to acceptinfinite
number of arguments.