Skip to content

This project aims to recreate the behavior of printf, including it's basic error handling and some of it's flags. We mainly learning about variadic arguments.

Notifications You must be signed in to change notification settings

JenniferAraujo/42cursus-Printf

Repository files navigation

42cursus-01-Printf

📚 About the project

This project aims to recreate the behavior of printf, including it's basic error handling and some of it's flags. We mainly learning about variadic arguments.

Score

thumbnail_IMG_9161

⚠️ Mandatory

  • Your function has to handle the following conversions: <cspdiuxX%>
  • Flags <-O.*> and minimum field width with all conversions

Functions in <ft_print_hex.c>

  • <%x> || <%X>: ft_print_hex - prints a number in hexadecimal format in lowercase and uppercase

Functions in <ft_print_pointer.c> (and auxiliary functions)

Functions in <ft_print_unsig.c> (and auxiliary functions)

Functions in <ft_printf.c>

  • ft_printf - initialization function: start/end variable argument functions where argument numbers are undefined
  • ft_format - checks each format specifier and calls as functions according to the collected format specifiers.

Functions in <ft_putchar.c>

  • <%c>: ft_putchar - writes a specified character to the output unit provided

Functions in <ft_putnbr.c> (and auxiliary functions)

  • <%i> || <%d>: ft_putnbr - prints the characters representing the numbers

Functions in <ft_putstr.c>

  • <%s>: ft_putstr - writes the string to the given output unit

Makefile

💻 Compiling the project

The library is written in C language and thus needs the -cc compiler and some standard C libraries to run.

Instruction

  1. Compiling the project

      $ make
      $ make fclean
    

    thumbnail_image2

  2. Execute your program

      $ cc ft_printf.c ft_putchar.c ft_putstr.c ft_print_unsig.c ft_print_pointer.c ft_print_hex.c ft_putnbr.c && ./a.out
    

    thumbnail_image1

🐞 Testing

Third-party testers used in the project

About

This project aims to recreate the behavior of printf, including it's basic error handling and some of it's flags. We mainly learning about variadic arguments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published