我只是在学习C并且正在使用xCode(不确定它是否重要).这段代码:
#includeint main (int argc, const char * argv[]) { int myInt; myInt = 2; myInt *= ( (3*4) / 2 ) - 9; printf("myInt = %d", myInt); return myInt; }
输出:
Session started at 2009-11-09 15:51:15 -0500.] myInt = -6 The Debugger has exited with status 250.The Debugger has exited with status 250.
printf是对的,但返回的是什么
A)使其包裹,和
B)两次显示结果?(澄清一下,如果我说return 0;
,它只打印一次"调试器退出"行,值为0.)
谢谢!
返回码被shell解释为无符号整数,范围为0-255.