Skip to content

louischap31/tinyprintf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello
This project is the lightweight and robust implementation of the standard C "printf" function.

To preserve academic integrity and prevent plagiarism, **the core source code (`.c`) is not provided**.
My implementation handles the following conversions with memory safety in mind:

* **%s**: Strings (handles `NULL` pointers safely)
* **%d / %i**: Signed Integers
* **%u**: Unsigned Integers
* **%x**: Hexadecimal (lowercase)
* **%o**: Octal
* **%c**: Characters
* **%%**: Percent sign escape

**Technical constraints met:**
* Strict C99 compliance (`-std=c99 -Werror -Wall -Wextra -pedantic`)
* No standard buffering (direct `putchar` usage)
* Custom `itoa` and base conversion algorithms


How to test?
    required: gcc and Criterion libs installed on your system.

    steps:  
        1/ clone the repo
        2/enter the commande "make check"
        3/critetion will run unit tests covering edge cases
        4/test yourself!
        5/just create a main.c to use the function and the cases u want to implement
        6/clean the project with make clean

About

A simplified printf implementation in C (Compiled library version)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors