Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_printf

Language School Norminette

Reimplementation of the C standard library printf function from scratch, as part of the 42 curriculum.

Description

ft_printf replicates the behavior of printf with support for multiple format specifiers. The project focuses on variadic functions, format string parsing, and memory-efficient character output.

Supported Format Specifiers

Specifier Description
%c Single character
%s String
%d / %i Signed decimal integer
%u Unsigned decimal integer
%x / %X Hexadecimal (lower / upper)
%p Pointer address
%% Literal %

Stack

  • Language: C
  • Key concepts: variadic functions (va_list, stdarg.h), format string parsing, low-level output via write(2)

How It Works

ft_printf(format, ...)
  → scan format string character by character
  → on '%': identify specifier → convert argument → write output
  → return total number of characters written

42 Project Info

Field Value
Project ft_printf
Circle 1
Norminette Compliant

What I Learned

  • How variadic functions work in C (stdarg.h)
  • Modular dispatch: one entry point routing to type-specific conversion functions
  • Low-level output management with write and byte counting

About

42 School project — reimplementation of the C printf function with format specifiers

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages