Skip to content

Latest commit

Β 

History

History
57 lines (48 loc) Β· 1.57 KB

File metadata and controls

57 lines (48 loc) Β· 1.57 KB

ft_printf

πŸ“Œ Project Description

The ft_printf project aims to replicate the behavior of the standard printf function from the C standard library. The project consists of creating a custom version, ft_printf, which handles formatted output.

The function prototype is:

int ft_printf(const char *, ...);

πŸš€ Compilation

To compile the project, run:

make

This will create the libftprintf.a library.

To clean object files:

make clean

To remove compiled files:

make fclean

To recompile from scratch:

make re

βš™οΈ Supported Format Specifiers

The ft_printf function supports the following format specifiers:

Specifier Description
%c Prints a single character
%s Prints a string
%p Prints a pointer address in hexadecimal format
%d Prints a decimal (base 10) number
%i Prints an integer (base 10)
%u Prints an unsigned decimal number
%x Prints a hexadecimal number (lowercase)
%X Prints a hexadecimal number (uppercase)
%% Prints a percent sign

πŸ” Features

  • Mimics the behavior of the real printf.
  • Handles variable argument lists using va_start, va_arg, va_copy, and va_end.
  • Does not use buffer management.
  • Built as a static library (libftprintf.a).
  • Can be linked with other projects.

πŸ› οΈ Usage

You can test ft_printf by using it instead of the original printf.

πŸ“œ License

This project follows the 42 School project requirements and is meant for educational purposes.