Skip to content

Berthran/printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#_printf Project

This project aims to create a semblance of the C printf function found in the stdio.h library.

Table of Contents

Features

  • Basic Formatting: Format and print strings, characters, and integers.
  • Variable Arguments: Support for variable arguments using the ... syntax.
  • Custom Specifiers: Implement custom specifiers for specialized formatting.
  • Error Handling: Handle errors gracefully and provide meaningful error messages.

Getting Started

Prerequisites

Ensure you have a C compiler installed on your system. This project is designed to work with standard C libraries.

Installation

  1. Clone the repository:
   git clone https://github.com/Berthran/_printf.git
  • Navigate to the project directory:
  • Compile the code
  • Run the executable:
cd _printf
gcc -o _printf _printf.c *.c
./_printf

Usage

To use the custom printf function in your code, include the main.h header file and call the _printf function as you would with the standard printf function. You can also explore and modify the code to add custom specifiers or enhance functionality.

#include "main.h"


int main() {
    _printf("Hello, %s! You have %d apples.\n", "John", 5);

    return 0;
}

Contributing

Contributions are welcome! If you have ideas for improvements, bug fixes, or new features, please open an issue or submit a pull request. Ensure your code follows the project's coding style and conventions.

License

This project is licensed under the MIT License, so feel free to use, modify, and distribute it.

About

A prototype of the famous C printf() function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages