#includevoid main(){int a,b,c;a=1,b=2,c=3;printf("%d\n",a=b==c);}答案是什么,
问题描述:
#includevoid main(){int a,b,c;a=1,b=2,c=3;printf("%d\n",a=b==c);}答案是什么,
答
答案是0a=b==c这个表达式是从右向左运算的,也就相当于a=(b==c)而b==c这个判断表达式显然是不成立的,所以有一个返回值为0.即,a=0;printf("%d\n",a=b==c);就相当于a=b==c;printf("%d\n",a);明白了么?至于2楼说的优先级...