Giter VIP home page Giter VIP logo

42_printf's Introduction

42_printf

About   |   Features   |   Usage   |   Allowed functions   |   Author


About

The ft_printf library provides a function that mimics the behavior of the original printf function in the C standard library. It is designed to handle various conversion specifiers allowing users to print formatted output to the standard output stream.

Features

  • Mimics the behavior of the original printf function.
  • Supports the following conversion specifiers:
    • %c: Prints a single character.
    • %s: Prints a string (as defined by the common C convention).
    • %p: Prints a void pointer argument in hexadecimal format.
    • %d: Prints a decimal (base 10) number.
    • %i: Prints an integer in base 10.
    • %u: Prints an unsigned decimal (base 10) number.
    • %x: Prints a number in hexadecimal (base 16) lowercase format.
    • %X: Prints a number in hexadecimal (base 16) uppercase format.
    • %%: Prints a percent sign.

Usage

To create the library, run the following command after cloning:

cd ft_printf && make

To test the library, compile your test code along with the ft_printf library as follows:

cd .. && cc -Wall -Wextra -Werror main.c ft_printf/ft_printf.a && ./a.out

Allowed functions

The following functions were allowed to be used in this project:

Function Man Short Description
malloc man 3 malloc Allocates a block of memory dynamically
free man 3 free Deallocates a block of memory
write man 2 write Writes to a file descriptor
va_start man va_start Initializes a va_list for variable arguments
va_arg man va_arg Retrieves the next argument in a va_list
va_copy man va_copy Copies the content of one va_list to another
va_end man va_end Ends traversal of a va_list

Additionally, using the libft library was also allowed.


Made by Boldizsar Szabo

42_printf's People

Contributors

szabold1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.