Skip to content

Bente1996/ft_printf2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

π‘‡β„Žπ‘–π‘  π‘π‘Ÿπ‘œπ‘—π‘’π‘π‘‘ β„Žπ‘Žπ‘  𝑏𝑒𝑒𝑛 π‘π‘Ÿπ‘’π‘Žπ‘‘π‘’π‘‘ π‘Žπ‘  π‘π‘Žπ‘Ÿπ‘‘ π‘œπ‘“ π‘‘β„Žπ‘’ 42 π‘π‘’π‘Ÿπ‘Ÿπ‘–π‘π‘’π‘™π‘’π‘š 𝑏𝑦 𝑏𝑒𝑑𝑒-π‘˜π‘œπ‘›.

Description:

The ft_printf project asks you to recode a simplified version of the C standard library (libc) function: printf (which can also be used as a shell command in Linux). This function formats text and writes it to the standard output. Ft_printf only handles the following conversions: c, s, p, d, i, u, x, X and %. Ft_printf doesn't handle buffer management and undefined behaviour in the same way as the original printf.

Instructions:

The project includes a makefile, so you can just compile it by typing 'make' in the command line. If you want to compile and run the program including the main.c file, type 'make run' instead.

Resources:

  • I had done this project already a year ago, so I relied a lot on my memories from past experience.
  • The printf Wikipedia page, printf on cppreference.com and man printf.
  • No AI was used.

Algorithm and data structure:

  • I used a recursive algorithm to format integers. I did this because it was a very concise approach and because I thought it would be good to practise the use of recursion.
  • Just like the original printf, my function takes a va_list type (internally a struct) as a parameter. Other than that I only used basic arithmetic data types (int and char) because that was sufficient.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published