C语言打印数字前补0
时间:2020-10-21 12:15:33
收藏:0
阅读:31
1、要求说明
例如有个数据为a = 0x10,要求打印输出为0x000010。
2、实现
1 #include <stdio.h> 2 3 4 int main() 5 { 6 int a = 0x10; 7 8 printf("%#08x\n", a); 9 10 return 0; 11 }
原文:https://www.cnblogs.com/mrlayfolk/p/13850940.html
评论(0)