Objective
Implement a tiny printf that walks a format string, expands the conversions %c, %s, %d, %x and %%, writes everything to standard output, and returns the exact number of bytes written.
Steps
$ mini_printf("hi %s, %d+%d=%d %c %x%%\n", "dev", 2, 3, 5, '!', 255)
hi dev, 2+3=5 ! ff%
$ mini_printf("user: %s\n", (char *)0)
user: (null)
$ mini_printf("balance %d, count %d\n", -42, 0)
balance -42, count 0
Expected files
Allowed functions
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Objective
Implement a tiny printf that walks a format string, expands the conversions %c, %s, %d, %x and %%, writes everything to standard output, and returns the exact number of bytes written.
Steps
$ mini_printf("hi %s, %d+%d=%d %c %x%%\n", "dev", 2, 3, 5, '!', 255)
hi dev, 2+3=5 ! ff%
$ mini_printf("user: %s\n", (char *)0)
user: (null)
$ mini_printf("balance %d, count %d\n", -42, 0)
balance -42, count 0
Expected files
Allowed functions
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Tests
Run the tests to grade your code