
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.
mini_printf("hi %s, %d+%d=%d %c %x%%\n", "dev", 2, 3, 5, '!', 255)Expected result
hi dev, 2+3=5 ! ff%For your own tracking. Tests grade your code.
mini_printf("user: %s\n", (char *)0)Expected result
user: (null)mini_printf("balance %d, count %d\n", -42, 0)Expected result
balance -42, count 0Expected files
mini-printf.cAllowed functions
writeAllowed headers
Standard C library
Implements the contract of a function from the standard C library.

v0.40: Create exercises. Challenge the community.
Meet Studio →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.
mini_printf("hi %s, %d+%d=%d %c %x%%\n", "dev", 2, 3, 5, '!', 255)Expected result
hi dev, 2+3=5 ! ff%For your own tracking. Tests grade your code.
mini_printf("user: %s\n", (char *)0)Expected result
user: (null)mini_printf("balance %d, count %d\n", -42, 0)Expected result
balance -42, count 0Expected files
mini-printf.cAllowed functions
writeAllowed headers
Standard C library
Implements the contract of a function from the standard C library.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.