Skip to content

custom implementation of the standard printf function in C

Notifications You must be signed in to change notification settings

shatilovdr/42-printf

Repository files navigation

ft_printf

ft_printf is a custom implementation of the standard printf function in C.This function replicates the behavior of printf and handles a subset of its features.

Features

  • Handles format specifiers:
    • %c for characters.
    • %s for strings.
    • %p for pointers.
    • %d and %i for integers.
    • %u for unsigned integers.
    • %x and %X for hexadecimal numbers (lowercase and uppercase).
    • %% for the literal % character.
  • Supports variable arguments using stdarg.h.
  • Adheres to 42 coding standards.

Installation

To include ft_printf in your project, clone the repository and compile the library:

git clone [email protected]:shatilovdr/42-printf.git
cd ft_printf
make

Usage

  1. Include the library header in your source code:
#include "ft_printf.h"
  1. Use ft_printf just like the standard printf function:
ft_printf("Hello, %s!.\n", "World");
  1. Compile your program and link it with libftprintf.a:
gcc -Wall -Wextra -Werror my_program.c -L. -lftprintf -o my_program

About

custom implementation of the standard printf function in C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published