VS2015 C中八进制显示问题
#include<stdio.h>int main()
{
int x = 100;
printf("dec=%d; octal=%0;hex=%x\n", x, x, x);
printf("dec=%d;octal=%#0;hex=%#x\n", x, x, x);
return 0;
}
运行结果:
dec=100;octal=;hex=64
dec=100;octal=;hex=0x64
为什么其中的八进制无法显示
2016-04-19 22:15
程序代码:#include<stdio.h>
int main()
{
int x = 100;
printf("dec=%d;octal=%o;hex=%x\n", x, x, x);
printf("dec=%d;octal=%#o;hex=%#x\n", x, x, x);
return 0;
}

2016-04-19 22:20
2016-04-19 22:25
2016-04-19 22:30
2016-04-19 22:35
2016-04-19 22:40