Code Monkey home page Code Monkey logo

markoscomk / 42-printf Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 337 KB

This project implements a custom function, ft_printf, that mimics the behavior of the standard C library function printf. ft_printf takes a format string and optional arguments, formats the output based on specifiers within the format string, and prints the result.

Makefile 3.94% C 96.06%
42-school 42commoncore 42school common-core ftprintf ftprintf-42 ftprintf42 printf printf-42

42-printf's Introduction

42cursus ft_printf()

ftprintf

Development repo for 42cursus ft_printf project



This is a project in daily use. If you want to see the project that i have been evaluated in 42school click in releases at the right side!

🗣️ About

_The aim of this project is to code a printf() function that will behave as close as possible from the original printf() from <stdio.h>


🧐 Great Resources for ft_printf()

42-Gitbook

C++ printf() reference

Oracle Docs

For detailed information, refer to the subject of the project

🚀 This project consists of recode the usetul printf() from <stdio.h> 
  • Supported conversions %: c, s, p, i, d, u, x, X
  • Supported flags: # + (space)
  • Supported options: - 0 . width

🛠️ Usage

Requirements

The function is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Instructions

make to compile.

Basic Usage

For example, let's create a main.c file.

// Include the header
#include "ft_printf.h"

int main(void)
{
      // Call the function
      ft_printf("Testing ft_printf!");
      return (0);
}

Compile the main.c file with the ft_printf library and run the program:

cc main.c libftprintf.a && ./a.out

Output should be:

Testing ft_printf!

Testing

WHY NOT ASSEMBLY?

++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>.>---.++++++++++++.++.+++ +++.--.<<++.>>------.------------.+++++++++++++.<<.>>++++++.------------ .-------. +++++++++++++++++++.<<.>>----------------.+++++.+++++++++.--- ----------.--.+ ++++++++++++++++.--------.+++++++++++++.<<.>>---------- -------------.+++.+++ ++++.---.----.+++++++++++++++++.--------------- --.-.<<.>>+++++.+++++.<<.>-------...

42-printf's People

Contributors

markoscomk avatar alabar666 avatar

Stargazers

Daniel Bruno avatar

Watchers

 avatar

Forkers

alabar666

42-printf's Issues

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.