Format HEX string...

What is the best way to format a HEX string to look like this:

FF08DC0A00

The array is setup like this:
static uint8_t test[] = { 0xFF, 0x08, 0xDC, 0x00, 0x0A, 0x00 };

But doing the following:
sprintf(tmpBuf, "%x%x%x%x", test[0], test[1], test[2], test[3]);

Returns the following:
FF8DCA0

Basically removing the leading "0".

Use a %02X format specifier instead of %x:

sprintf(tmpBuf, "%02X%02X%02X%02X", test[0], test[1], test[2], test[3]);

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

Thanks!