这段程序结果为什么是2 #include<stdio.h> main() {int a=2,b=-1,c=2; if(a<b) if(b<0)c=0; else c+=1;

日期:2012-12-13 17:22:41 人气:1

这段程序结果为什么是2 #include<stdio.h> main() {int a=2,b=-1,c=2; if(a<b) if(b<0)c=0; else c+=1;

因为 a= 2,b= -1 if(a<b) 中 a<b 为假,便不执行下面的if..else 直接运行 printf("%d\n",c); 便是 2
    A+
热门评论