Skip to content

Mahdi3Bani/holbertonschool-printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRINTF(1)

This README file have the fully description of our first group project in holberton-school, the project is about the implementation of printf function, it means we gonna write our own printf function. Below you'll find how printf works, and how to design the proper formatting specification for any occasion Prototype of printf function int _printf(const char *format, ...); Returns: the number of characters printed (excluding the null byte used to end output to strings

Usage && Examples

Include main.h Call _printf, passing a formatted string with any format specifiers and optional arguments Upon success, it writes desired output to stdout Upon error, it returns -1 If NULL is passed in as a string argument, it prints (null) Format Specifier.

To use the _printf function you simply need to compile all files .c including the header holberton.h with a main function.

'#include "main.h"

int main(void) { _printf("let's print hello world!");

return (0); }

Compilation:

$ gcc *.c -o

Output:

let's print hello world!

You can do much more, by combining specifiers like string or integer.

Files

Below a list of the used files during project:

  • [_printf.c] - produces output according to a format.
  • [get_printf.c] - containing functions for specifiers _putchar.c.
  • [function.c] - containing function that writes a char to stdout.
  • [main.h] - header file with function prototypes and struct for specifiers.

Authors

Mahdi Bani

Malek Mayeh

Med Ali Krifa

About

printf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages