use the printf function with a format specifier for whatever number system you want eg printf("%d",0xA) will convert 0xA to a decimal number which is 10.