Skip to content

Ft_printf is a custom implementation of the standard C printf function, designed to handle formatted output and enhance your understanding of variadic functions and formatting in C.

Notifications You must be signed in to change notification settings

doooriian/Ft_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


42 Logo

Ft_printf

A custom Printf implementation from 42 School

Ft_printf Badge

GitHub code size in bytes Code language count GitHub top language GitHub last commit


✨ Overview

Ft_printf is an individual project at 42 School that recreates the standard C printf function from scratch. This project focuses on handling formatted output with essential specifiers and conversions, mastering variadic arguments, and ensuring robust string manipulation. It’s a key step in building foundational skills for the 42 curriculum.

The goal? Deliver a reliable, custom Printf that mirrors the core functionality of the original.


📑 Key Features

Supported Conversions

  • %c — Prints a single character.
  • %s — Prints a string.
  • %p — Prints a pointer address in hexadecimal.
  • %d/%i — Prints a decimal integer (signed).
  • %u — Prints an unsigned decimal integer.
  • %x/%X — Prints a hexadecimal integer (lowercase or uppercase).
  • %% — Prints a literal percent sign.

Core Files

  • main.c — Main file handling format string parsing and output.
  • print.c — Routes to the appropriate conversion function.
  • utils.c — Contains several functions that are useful and necessary for other files.

🛠️ Technologies Used

  • C — Core programming language.
  • Makefile — Build automation tool.

🚀 How to Build and Run

  1. Clone repository

    git clone git@github.com:doooriian/Ft_printf.git
  2. Go inside project directory and run make

    cd Ft_printf
    make
  3. To use the library in your code, #include the following header

    #include "printf.h"

🧪 Testing

This project was tested using Francinette, a widely-used third-party tester designed for 42 School projects, along with custom test cases to ensure compliance with the printf standard.

✅ Results

Here’s my score for the Ft_printf project:

Ft_printf Grade

📬 Contact

Feel free to reach out or contribute to this project via GitHub!

About

Ft_printf is a custom implementation of the standard C printf function, designed to handle formatted output and enhance your understanding of variadic functions and formatting in C.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published