Skip to content

josephcheel/42-Ft_Printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ft_Printf |  42 Cursus Complete

Recoded Printf function from Libc. And learn about variadic functions.

What is the project about

This project has two parts organized in two level of difficulty: the mandatory and the bonus part. Mandatory only manages character, string, pointer, decimal, interger, unsigned decimal, hexadecimal and % sign. Bonus part requires to manage -0.# + flags. ft_printf project aims on learning the logic of having an unspecified number of arguments or variadic functions.

General Instrucctions

  • The project must compile with a Makefile without relinking.
  • Makefile has to contain at least this rules: $(NAME), all, clean, fclean and re
  • The project must compile with -Wall -Wextra -Werror flags.
  • After compiling a library named libftprintf.a file has to appear.

To compile the project

> make
> gcc main.c libftprintf.a
> ./a.out

Mandatory Instrucctions

Requirements

Prototype of the ft_printf function: int ft_printf(const char *, ...);

The Mandatory implements the following conversions:

  • %c Prints a single character.
  • %s Prints a string (as defined by the common C convention).
  • %p The void * pointer argument has to be printed in hexadecimal format.
  • %d Prints a decimal (base 10) number.
  • %i Prints an integer in base 10.
  • %u Prints an unsigned decimal (base 10) number.
  • %x Prints a number in hexadecimal (base 16) lowercase format.
  • %X Prints a number in hexadecimal (base 16) uppercase format.
  • %% Prints a percent sign.

Here are the requirements: • You must use the command ar to create your library. Using the libtool command is forbidden. • Your libftprintf.a has to be created at the root of your repository

Bonus Instrucctions

Releases

No releases published

Packages

No packages published