- Jeffrey Kanemitsu
- Larry Madeo
_printf
is a function that prints a string of characters.
- Create our own custom implementation of printf that is in the standard library
<stdio.h>
. - Understand all concepts used in order to complete this project such as: variadic functions, typedef structs, function pointers, etc.
- Be in the desired directory that you want this function to be in.
- Go to https://github.com/Hillmonkey/printf.
- Clone the repository.
- Clone the respository into your terminal.
- Use "holberton.h" as the header file for this function in order to compile.
- The code will be compiled using:
gcc -Wall -Werror -Wextra -pedantic *.c
- Not allowed to use global variables
- No more than 5 functions per file
- The prototypes of all your functions should be included in your header file called holberton.h
- All your header files should be include guarded
- Authorized functions and macros:
- write (man 2 write)
- malloc (man 3 malloc)
- free (man 3 free)
va_start (man 3 va_start)
va_end (man 3 va_end)
va_copy (man 3 va_copy)
va_arg (man 3 va_arg)
- Have to use own
_putchar
function
-
I'm not going anywhere. You can print that wherever you want to. I'm here and I'm a Spur for life
- Write a function that produces output according to a format.
- Prototype: int
_printf(const char *format, ...);
- Returns: the number of characters printed (excluding the null byte used to end output to strings)
- format is a character string. The format string is composed of zero or more directives
- You need to handle the following conversion specifiers:
- c
- s
- %
-
Education is when you read the fine print. Experience is what you get if you don't.
- Handle the following conversion specifiers:
- d
- i
- Handle the following conversion specifiers:
-
With a face like mine, I do better in print.
- Create a man page for your function.
- File name:
man_3_printf
v.98