Minimal implementation of printf from stdio.h
Protoype: tinyprintf(const char *fmt, ...)
makeor
gcc -L . -l:libprintf.a <file.c> tinyprintf.c utils.c buffer.c#include "tinyprintf.h"
...
tinyprintf("Hello World"); // "Hello World"
tinyprintf("Hey, C is %s!", "cool"); // "Hey C is cool"
tinyprintf("%%"); // "%"
tinyprintf("%x\n", 3405691582); // "cafebabe"| wildcard | type |
|---|---|
| %c | char |
| %s | char* |
| %d | int |
| %u | unsigned |
| %o | octal |
| %x | hexadecial |