Closed XiaoBaiBZS closed 11 months ago
#include <stdio.h> int main(){ int a=3; int b=4; int c=5; printf("%d\n", (a || b)+(c && b-c)); printf("%d\n", a || b+(c && b-c)); printf("%d\n", (a || b)+c && b-c); printf("%d\n", a || b+c && b-c); return 0; }
为什么输出是2 1 1 1,而不是2 2 2 2?
2 1 1 1
2 2 2 2
运算符的优先级,去复习一下
为什么输出是
2 1 1 1
,而不是2 2 2 2
?