This project is an application of the C programming knowledge that Holberton School cohort 13 students have learned since starting the program on September 2020. So, this repository contain the files that makes our own printf function, i.e. a printf clone. Variable arguments are managed by Variadic - macros like va_start, va_arg and va_end from the stdarg library. We iterate character by character in a for loop and copy each character to output string. Same time we check for "%". "%" is not copied to output string. Once we found it, we check the next character: the formatting character.
int _printf(const char *pszFormatString, ...);
Specifier | Description |
---|---|
%c | print a single character |
%s | print a string of characters |
%d | print a decimal (base 10) number |
%i | print an integer in base 10 |
gcc -Wall -Wextra -Werror -pedantic -Wno-format *.c
David Steven Henao | @daviramiz
Johan Balbin | @balbinxx