Projet Ft_printf of 42 school
The printf function is one of the most versatile and well-known functions in the C language. From a testing aid to tabulation method, printf is a very powerful and important tool in every dev's kit. This project aims to recreate the behaviour of the original MacOS's printf, including its basic error management, some of its flags, minimum field width stipulation and most of its basic conversions.
Format Specifier | Description | |
---|---|---|
% | % followed by another % character writes % to the screen. | |
c | writes a single character. | |
s | writes a character string. | |
p | writes an implementation-defined character sequence defining a pointer address. | |
d or i | writes a signed integer to decimal representation. | |
u | writes an unsigned integer to decimal representation. | |
x or X | writes an unsigned integer to hexadecimal representation. | |
This Project was made with:
The function is written in C language and thus needs the gcc
compiler and some standard C libraries to run.
1. Compiling the library
To compile, go to the library path and run:
$ make
2. Using it in your code
To use the library functions in your code, simply include its header:
#include "ft_printf.h"
One of the third party testers I used : francinette