test.c
#include <stdio.h>
int main(void){
int d = 100; // decimal
int x = 0x100; // hexadecimal
printf("d = %d\n", d);
printf("x = %d\n", x);
printf("d = 0x%x\n", d);
printf("x = 0x%x\n", x);
return 0;
}
実行結果
d = 100
x = 256
d = 0x64
x = 0x100