Skip to content

A custom implementation of the C printf function that handles formatted output for strings, integers, characters, pointers, and hexadecimal values.

Notifications You must be signed in to change notification settings

Jaezat/Ft_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ft_printf

ft_printf is a custom implementation of the standard C printf function.
The goal of the project is to handle formatted output for different data types while reinforcing core C programming concepts.


Usage

After compiling your ft_printf project, you can use it like the standard printf:

#include "ft_printf.h"

int main(void)
{
    ft_printf("Hello %s!\n", "world");
    ft_printf("Number: %d, Hex: %x\n", 42, 42);
    return 0;
}

Supported Format Specifiers

%c– character %s – string %d / %i – integer %u – unsigned integer %x / %X – hexadecimal %p – pointer %% – literal %


How it Works

ft_printf works by:

  1. Parsing the format string.
  2. Identifying format specifiers.
  3. Using variadic functions to retrieve arguments.
  4. Converting and printing each argument according to its format.

Recap

  • Handling variadic functions in C.
  • Parsing and interpreting format strings.
  • Converting integers to strings and hexadecimal.
  • Managing output for multiple data types.
  • Strengthening core C programming skills.

About

A custom implementation of the C printf function that handles formatted output for strings, integers, characters, pointers, and hexadecimal values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published