This repository hosts a custom printf implementation in C, developed as part of the ALX School curriculum. It aims to replicate the standard C library's printf function with added features like enhanced error handling, improved formatting options, and support for additional data types, providing greater flexibility.
int _printf(const char *format, ...);
gcc -Wall -Werror -Wextra -pedantic *.c
For help run :
man ./printf
Specifiers | Description |
---|---|
%c |
Print characters |
%s |
Print strings |
%S |
Print Non printable characters as (\x) |
%d and %i |
Print integers |
%u |
Print unsigned integers |
%b |
Print binary |
%o |
Print octal numbers |
%x |
Print lowercase hexadecimal |
%X |
Print uppercase hexadecimal |
%p |
Print a memory addresse |
%r |
Print a reversed string |
%R |
Print a string in ROT13 encryption |
%% |
Print a literal '%' character |
#include "main.h"
int main(void) {
int len;
len = _printf("Hello, %s!\n", "World");
return (0);
}