The printf
project involves recreating the libc
's printf()
function. This will introduce you to variadic functions in C, a critical skill for handling functions that accept an indefinite number of arguments. Implementing this function will help you understand more about handling different data types and formatting output.
Your implementation of ft_printf()
must handle the following conversions: c
, s
, p
, d
, i
, u
, x
, X
, and %
.
%c
Prints a single character.%s
Prints a string.%p
Prints a `void *` pointer in hexadecimal format.%d
and%i
Print a signed integer in base 10.%u
Prints an unsigned decimal (base 10) number.%x
Prints a number in hexadecimal (base 16) lowercase.%X
Prints a number in hexadecimal (base 16) uppercase.%%
Prints a percent sign.