ft_printf is a project at 42 that involves reimplementing the C standard library function printf. The goal is to learn how to use variadic arguments to create a function that can mimic the printf function's behavior.
- Resembles the original
printffunctionality. - Handles conversion specifiers:
%c,%s,%p,%d,%i,%u,%x,%X, and%%.
To clone the repository use:
git clone https://github.com/moop250/ft_printf.gitCompilation & cleanup:
make: Compiles the project and generates the libftprintf.a library.make clean: Cleans up object files (.o).make fclean: Cleans up all files generated by running make, including the libftprintf.a library.make re: Does a make fclean followed by a make to recompile the library.
Example usage in a C file:
#include "ft_printf.h"
int main()
{
ft_printf("Hello, %s! This number is %d.", "World", 42);
return (0);
}