我的书中有一个问题:
#include<stdio.h> void main() { int a=5, b=-7, c=0, d; d = ++a && ++b || ++c; printf("\n%d%d%d%d",a,b,c,d); }
这个问题问我代码的输出是什么.我跑了,屏幕上的结果是6-601.我明白为什么a=6和b=-6,但我不明白为什么c=0和d=1?
a=6
b=-6
c=0
d=1
c logical-operators
c ×1
logical-operators ×1