GithubHelp home page GithubHelp logo

khodizoda / 42_ft_printf Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 165 KB

42_Project: ft_printf (new curriculum). The aim of the project is to recode the libc’s printf function.

C 96.89% Makefile 3.11%
42 42born2code 42school 42projects 42siliconvalley 42fremont printf-42 printf ftprintf c

42_ft_printf's Introduction

42_ft_printf (new curriculum)

  • The aim of the project is to recode the libc’s printf function.

About printf

man 3 printf

The printf() function writes the output under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of stdarg(3)) are converted for output.

Return value

Upon successful return, pfrintf returns the number of characters printed (excluding the null byte used to end output to strings). If an output error is encountered, a negative value is returned.

About ft_printf

prototype:

int    ft_printf(const char *format, ... );
supported specifiers : cspdiuxX%
specifier description
c unsigned char
s string
p pointer
d / i integers
u unsigned int
x lowercase hexadecimal
X uppercase hexadecimal
% percent sign
supported flags : 0-.*
flags description
0 zero padding
- left justify (right justification by default)
. precision
* wildcard for field width and precision

Usage

Download and compile repo:

git clone https://github.com/khodizoda/42_ft_printf && cd 42_ft_printf && make

Execute with:

gcc -Wall -Wextra -Werror -L. -lftprintf <yourfile.c> && ./a.out

Moulinette

FT_PRINTF: 100/100
test_spdxiucpercent: 8/8 correct functions | test_fields: 4/4 correct functions

42_ft_printf's People

Contributors

khodizoda avatar

Stargazers

 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.