Skip to content

Latest commit

 

History

History

ft_printf

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

FT_PRINTF

Because ft_putnbr() and ft_putstr() aren't enough



Summary

  • The goal of this project is pretty straightfoward. You will recode printf(). You will mainly learn about using a variable number of arguments.
  • You will discover variadic functions in C.



Install (Bonus excluded)

$ make




Usage

$ [CC] [CFLAGS] [your_main.c] libftprintf.a -o main.out
  • Compile library file (libftprintf.a) with your c files.
  • You need to include 'ft_printf.h' header into your c or header files.

Prototype

int ft_printf(const char *str, ...);

Example

#include "ft_printf.h"

int main(void) {
	char *my_name = "younhwan";
	ft_printf("Hello World!\nI'm %s.\n", my_name);
	return (0);
}


>> ./main.out
Hello World!
I'm younhwan.
>>