This is a reimplementation of the printf function from the C standard library.
It introduces to structured programming, variadic programming and number base conversions.
| Specifier | Description |
|---|---|
%c |
Single character |
%s |
String |
%p |
Pointer address |
%d, %i |
Integer |
%u |
Unsigned integer |
%x, %X |
Hexadecimal (lower/uppercase) |
%% |
Percent sign |
# Clone repository
git clone https://github.com/yannallo/ft_printf.git
# Build
make -C ft_printfInclude the header in your file and link during compilation.
gcc -Ift_printf main.c -Lft_printf -lftprintf -o test#include "ft_printf.h"
int main(void)
{
char s[15] = "Hello world !!";
ft_printf("Message:\n%s\n", s);
return 0;
}