#include #include void print_hex(int n); int main(int argc, char *argv[]) { print_hex(14*256 + 11*16 + 8); //0xeb8 print_hex(4*256 + 2*16 + 0); //0x420 return 0; } void print_hex(int n) { printf("%x\n", n); }