%02u will also give you at least two digits, 0-prefixed if needed. I like doing it that way since that's also how you 0-prefix floats.
printf-style formatting does take some getting used to, but it's quite powerful and as such has been implemented in quite a few languages now.
"incompatible implicit declaration of built-in function 'sprintf' [enabled by default]".
The compiler encountered a call to sprintf without being told what sprintf would look like. That's normally ok because implicit declarations are enabled, but the compiler has knowledge of sprintf built in and that built-in prototype isn't compatible with the arguments you're passing it. So the compiler hopes you know what you're doing. I would guess that warning means the built-in behavior won't run, and instead a call to a real function "sprintf" will be generated.
I'm not sure what the implicit declaration of sprintf looks like, but it doesn't have to be implicit. To get the explicit declaration of sprintf, #include <string.h> Once the compiler has an explicit declaration, the warning will likely turn into an error (something like "could not convert parameter 2 from char const * to char *")