uint64_t num = 9223354444668731392; printf("%lu ", num); //十进制输出 printf("0x%"PRIx64" ", num); //十六进制输出 printf("0x%016lx ", num); //十六进制输出
运行结果:
1 9223354444668731392 2 0x7ffff00000000000 3 0x7ffff00000000000