Format specifier %02x

The Solution to Format specifier %02x is


%02x means print at least 2 digits, prepend it with 0's if there's less. In your case it's 7 digits, so you get no extra 0 in front.

Also, %x is for int, but you have a long. Try %08lx instead.

~ Answered on 2013-08-26 07:38:08


Most Viewed Questions: