问题 填空题

阅读下面语句,则程序的执行结果是 【7】 。 #include "stdio.h" main() { int a=-1,b=1,k; if((++a<0)&&! (b--<=0)) printf("%d,%d\n",a,b); else printf("%d,%d\n",b,a);}

答案

参考答案:1,0

解析: 与运算两边的语句必须同时为真的,结果才为真。当执行完if((++a<0)&&!(b--<=0))时,a,b的值已经发生了变化。

操作题
单项选择题