A small description of the required conversion:
%c
print a single character.%s
print a string of characters.%p
The void * pointer argument is printed in hexadecimal.%d
print a decimal (base 10) number.%i
print an integer in base 10.%u
print an unsigned decimal (base 10) number.%x
print a number in hexadecimal (base 16).%%
print a percent sign.
Main
Conversion functions
Conversion | Description | Project |
---|---|---|
c | Single ascii character | Mandatory |
s | String of characters NULL terminated | Mandatory |
p | Pointer location converted to hexadecimal value | Mandatory |
d | Decimal number | Mandatory |
i | Integer in decimal base | Mandatory |
u | Unsigned integer in decimal base | Mandatory |
x | Unsigned number printed in lowercase hexadecimal base | Mandatory |
X | Unsigned number printed in uppercase hexadecimal base | Mandatory |
% | The '%' ascii character | Mandatory |
o | Unsigned number printed in octal base | Extra |
ft_printf
requires a gcc compiler and some standard libraries.
Clone this repository in your local computer:
$> git clone https://github.com/spnzed/ft_printf.git
In your local repository, run make
$> make
make
suports 6 flags:
make all
or simplymake
compiles printf in its mandatory formatmake clean
deletes the.o
files generated during compilationmake fclean
deletes the.o
and thelibftprintf.a
library file generatedmake re
executesfclean
andall
in sequence, recompiling the library
To use the libftprintf in your code you will need to include the header:
#include "ft_printf.h"