42 Urduliz — Common Core project
A reimplementation of the C standard library printf function, handling the most common format specifiers.
| Specifier | Output |
|---|---|
%c |
Single character |
%s |
String |
%p |
Pointer address (hex) |
%d / %i |
Signed decimal integer |
%u |
Unsigned decimal integer |
%x / %X |
Hexadecimal (lower/upper) |
%% |
Literal percent sign |
make
# Links as a static library: libftprintf.aInclude in your project:
#include "printflib.h"
ft_printf("Hello %s, you are %d years old\n", name, age);Uses variadic functions (va_list, va_arg) to handle variable argument lists. Each format specifier is dispatched to a dedicated handler function.
C Variadic Functions String Formatting Static Library Makefile
This repository is shared for educational and portfolio purposes only.
For 42 students:
- Do not copy this code for your own project submissions
- Use it as a reference to understand concepts and approaches
- Write your own original solution — that is the only way to actually learn
42's core values are learning through practice, peer collaboration, and genuine problem-solving.
MIT — see LICENSE for details. Copyright (c) 2026 Eneko Muñoz Bordona