Table of Contents
In this project, we needed to implement a simple version of the libc function printf. To be more precise, this implementation recreate the following:
| Convertion | Usage |
|---|---|
%c |
Prints a single character. |
%s |
Prints a string (as defined by the common C convention). |
%p |
The void * pointer argument has to be printed in hexadecimal format. |
%d |
Prints a decimal (base 10) number. |
%i |
Prints an integer in base 10. |
%u |
Prints an unsigned decimal (base 10) number. |
%x |
Prints a number in hexadecimal (base 16) lowercase format. |
%X |
Prints a number in hexadecimal (base 16) uppercase format. |
%% |
Prints a percent sign. |
To use this function download the repo and compile it with the make command.
- Include the function header in your project like so:
#include "ft_printf.h"- Compile your program including the libftprintf.a file as such:
gcc <your_program.c> libftprintf.a -I <path/to/your/headers>Distributed under the GNU General Public License version 3 (GPLv3).
Christian C. Del Moro - christian.delmor@gmail.com
Project Link: https://github.com/chrisdelmoro/ft_printf
