#include <iostream> using namespace std;
int main() { int x = 2, y, z; x *= (y=z=5); z = 3; x += (y & z); x += (y && z); cout << x << endl; return 0; }
int main() { int x = 2, y, z; x *= (y=z=5); // 括号内返回5,x = 10 y = 5, z =5; z = 3; x += (y & z); // x = x + 1 = 11 x += (y && z); // x = x + 1 = 12 cout << x << endl; return 0; } 输出12.
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题