哪位大牛能解释下这段代码的输出结果啊跟printf()的实现机制有关。多谢
哪位大牛能解释下这段代码的输出结果啊!跟printf()的实现机制有关。谢谢!#include stdio.hint main(){pri
哪位大牛能解释下这段代码的输出结果啊!跟printf()的实现机制有关。谢谢!
#include <stdio.h>
int main()
{
printf("%d\n");
return 0;
}
[解决办法]
[解决办法][解决办法]看看标准的规定吧:
If there are insufficient arguments for the format, the behavior is
undefined.
[解决办法][解决办法]要解释很简单,你没提供参数,那么编译器就在你的栈上找个值作为%d的参数解释呗。 你可以这句前面定义一些变量再输出看看
[解决办法][解决办法]因为vc的release没有填充值。
vc的debug一般会填充一些固定的特殊值以供调试。
比如cc,cd