printing all hex digits in c
if i have long long number with zeros before the number like this 0x000000000076fba1 how do i print the number with a开发者_如何学Cll the zeros? cuse when i tried to print the numb its writs 0x76fba1.
thank you!
long long unsigned n = 0x000000000076fba1;
printf("%0x0.16llx\n", n);
#ifdef __int64
printf("%#018I64x\n", n); /* for MSVC+MinGW */
#else
printf("%#018llx\n", n); /* other compiler with "unsigned long long" support */
#endif
精彩评论