Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


📜 About Project

This project is pretty straight-forward. You will implement your own printf. You will mainly learn how to use variadic arguments.

For detailed information, refer to the subject of this project.

🚀 TLDR: This project consists of coding a library that contains a simplified version 
	 of the printf function.

Note

Because of 42 School norm requirements:

  • Each function can't have more than 25 lines of code.
  • All variables are declared and aligned at the top of each function.
  • Project should be created just with allowed functions otherwise it's cheating.

📑 Supported Specifiers

These specifiers are supported by my printf implementation.

Specifier Short Description
%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.

👨‍💻 Usage

Requirements

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

Instructions

1. Compiling the library

To compile the library, run:

$ cd path_to/printf && make

2. Using it in your code

To use the library functions in your code, simply include its header:

#include "ft_printf.h"

and, when compiling your code, add the required flags:

-lftprintf -L path_to/libftprintf.a -I path_to/ft_printf.h

About

C implementation of printf (42 project)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages