printf is a 42 school project whose goal is to recode the libc function printf.
- Clone the repository
- Run
maketo compile the library - Include the header file
ft_printf.hin your project - Compile your project with the library
libftprintf.a
- C compiler (clang or gcc)
- Make
- The function must be named ft_printf.
- The function must be prototyped as follows:
int ft_printf(const char *, ...); - The function must not do the buffer management like the real printf.
- Manage the following conversions:
cspdiuxX%
| %c | Prints a single character. |
| %s | Prints a string of characters. |
| %p | Prints a pointer's address. |
| %d %i | Prints a signed decimal integer. |
| %u | Prints an unsigned decimal integer. |
| %x | Prints a number in hexadecimal (lowercase). |
| %X | Prints a number in hexadecimal (uppercase). |
| % | Prints a percent sign. |
cc name_file.c libftprintf.a -o name_program #the name_program executable#include "ft_printf.h"
int main(void)
{
ft_printf("Hello, World!");
return (0);
}