Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

KrebsCoder/ft_printf

Repository files navigation

Printf

This is the third project of école 42 projects.
Once you really understand how printf works, writing your own printf is not that hard!
If you wish to have your own printf, i really encourage you to do so, you will learn a lot. 😄

🗒️ About

This project objetive is to mimic the behavior of the famous printf function.
If you want to test the real printf, all you need to do is to open a .c file, include the <stdio.h> library and use the printf like this:

printf("test")

The printf can print a lot of types of data, and we are covering just a few of those:

  • %c print a single character.
  • %s print a string of characters.
  • %p the void * pointer argument is printed in hexadecimal.
  • %d print a decimal (base 10) number.
  • %i print an integer in base 10.
  • %u print an unsigned decimal (base 10) number
  • %x print a number in hexadecimal (base 16), with lowercase.
  • %X print a number in hexadecimal (base 16), with uppercase.
  • %% print a percent sign.

For more details and references, you can access this link: Printf manual page

⌨️ How to compile it

clang *.c ft_printf.h && ./a.out

  • The *.c means the compiler is going to compile all files that ends with .c
  • The ft_printf.h is necessary, it contains all the functions prototypes, it's also creating a printf library and contains the defined macros.
  • The get_next_line.h has the header with the prototypes of utils.
  • main.c has the test.
  • When we compile with the first part of the command line, it's going to be generate an executable file so the && ./a.out is saying to the compiler to also execute it.

🤝 Contributors

The collab:

Gabi sertori avatar
Gabi Sertori
Lucas krebs avatar
Lucas Krebs

📮 Contact

Please, if you encounter any bug, errors or have any tips, feel free to make contact. Open an issue here with the title [bug], [problem], [sugestion] or [update] and describe the issue.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published