A-A+
阅读下面语句 则程序的执行结果是【 】。 include stdio.h main()
问题详情
阅读下面语句,则程序的执行结果是【 】。 include "stdio.h" main() { int a=-1,b=1,k; if((a<0)&&! (b--<=0)) printf("%d,%dn",a,b); else printf("%d,%dn",b,a);}请帮忙给出正确答案和分析,谢谢!
参考答案
正确答案:10
与运算两边的语句必须同时为真的,结果才为真。当执行完if((++a<0)&&!(b--<=0))时,a,b的值已经发生了变化。