Skip to content

This project is an implementation of the printf built in command

Notifications You must be signed in to change notification settings

fatimasalem/ft_printf

Repository files navigation

icon

Typing SVG

forthebadge forthebadge

Content icon

About icon

This project is about implementing the printf() built-in function.

The following converions are handled in this project:

  • %s string
  • %u unsigned decimal
  • %i integer
  • %d decimal
  • %p pointer
  • %x lower case hexadecimal
  • %X upper case hexadecimal
  • %c character
  • %% percentage

NOTE: Main file is uploaded to check, test and compare the project conversions outpust to the main printf built-in command

Development icon

Makefile creates a Files directory which hold the project content

icon

The content include:

  1. inc : ft_printf.h
  2. src : ft_printf.c ft_character.c ft_string.c ft_putnbr.c ft_hexa.c ft_ pointer.c ft_unsigned.c main.c
  3. obj : ft_printf.o ft_character.o ft_string.o ft_putnbr.o ft_hexa.o ft_ pointer.o ft_unsigned.o main.o

NOTE: The best way to test your code is by simply comparing your function output with printf() outputs as it show below:

icon

Challenges icon

In This project the main challenge i faced is to learn and to know how to work with the variadic functions. Sense the built-in command printf take infinte number of arguments it was a challenge to figure how to implement the same function in my code, and the variadic functions were the answere. Implementing va_start(), va_arg() and va_end() gave my function the ability to accept infinite number of arguments.

Project Grade icon

Screen Shot 2023-02-05 at 11 47 29 PM


GitHub   Linkedin           

About

This project is an implementation of the printf built in command

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published