So <inttypes.h> defines macros for printf-style formats for printing the <stdint.h> types - uint8_t, etc.
https://en.wikibooks.org/wiki/C_Programming/inttypes.h
But there don't seem to be any for printing with leading zeros - eg, as with "%02X"
Am I missing something ... ?
EDIT
No, PRIX8 does not give leading zeros.