Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.62 KB

README.md

File metadata and controls

56 lines (34 loc) · 1.62 KB

Custom printf Implementation in C

Description

This repository contains a custom implementation of the printf function in C programming language. The printf function is a powerful tool for formatted output, and this implementation provides a simplified version for educational purposes and customization.

Features

  • Basic Formatting: Support for %s, %d, %c, and other basic format specifiers.
  • Variable Arguments: Handle a variable number of arguments.
  • Buffering: Implement buffering techniques for efficient output handling.
  • Customization: Easy to customize and extend for specific formatting needs.

Usage

To use the custom printf function in your C program, follow these steps:

  1. Clone this repository to your local machine:

    git clone https://github.com/SageLovedayy/printf.git
  2. Include the main.h header file in your C file:

    #include "main.h"
  3. Call the _printf function with the desired format and arguments:

    _printf("Hello, %s! The answer is %d.\n", "World", 42);
  4. Compile your program with the custom printf implementation:

    gcc  -Wall -Werror -Wextra -pedantic -std=gnu89  _printf.c my_program.c -o my_program
  5. Run the compiled program:

    ./my_program

Customization

Feel free to customize the _printf function according to your specific requirements. You can modify the format specifiers, implement additional features, or optimize the buffering strategy.

Acknowledgments

Special thanks to the ALX community for inspiration, training and support.