如果我在这个数字之前有一个长的数字,则为0x000000000076fba1 如何用全零打印数字? cuse当我试图打印麻木它的令状0x76fba1。
谢谢你!答案 0 :(得分:2)
long long unsigned n = 0x000000000076fba1;
printf("%0x0.16llx\n", n);
答案 1 :(得分:0)
#ifdef __int64
printf("%#018I64x\n", n); /* for MSVC+MinGW */
#else
printf("%#018llx\n", n); /* other compiler with "unsigned long long" support */
#endif