Skip to content

hasnasln/my_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

ft_printf

Reimplementation of the standard printf function in C, developed as part of the 42 School curriculum.


πŸ“Œ Description

The goal of this project is to implement a simplified version of the printf function from the C standard library. This custom implementation handles various format specifiers and uses variadic functions.


πŸ› οΈ Supported Format Specifiers

This version of ft_printf supports the following conversions:

Format Description
%c Character
%s String
%d Signed decimal integer
%i Signed decimal integer
%u Unsigned decimal integer
%x Unsigned hexadecimal (lowercase)
%X Unsigned hexadecimal (uppercase)
%p Pointer address

πŸ“ Project Files

Header File: ft_printf.h

Defines the public function prototype and helper functions.

Source Files:

  • ft_printf.c β€” Main implementation of the ft_printf function
  • ft_putstr.c β€” String printing and character output
  • ft_int_number.c β€” Integer formatting
  • ft_hexnumber.c β€” Hexadecimal formatting
  • ft_unsigned.c β€” Unsigned integer formatting
  • ft_pointer.c β€” Pointer address formatting
  • ft_step.c β€” Helper function for number-to-string conversion steps

Example

#include "ft_printf.h"

int	main(void)
{
	int	num = 42;
	ft_printf("Hello, number: %d\n", num);
	return (0);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published