You probably want to use sscanf to convert your hex string into a numerical value. Once a number you can then print it out in decimal/hex/oct with a printf call.