Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_printf

A custom implementation of the C printf function as part of the 42 school curriculum.

📌 Objective

Recreate the functionality of the standard printf function in C, including formatted output and a subset of format specifiers, all while respecting project restrictions (no malloc, limited standard library functions, manual handling of variadic arguments).

✅ Supported Features

  • Format specifiers:
    • %c, %s, %p, %d, %i, %u, %x, %X, %%
  • Flags:
    • -, 0, #, +, space
  • Width and precision handling
  • Bonus part included (flags + extra specifiers)

🛠 Usage

#include "ft_printf.h"

int main(void)
{
    ft_printf("Hello %s! Number: %d\n", "world", 42);
    return (0);
}

About

The goal of this project is quite straightforward: you will reimplement printf(). This will primarily teach you how to handle a variable number of arguments. How cool is that? Actually, it’s pretty cool! :)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages