我已经运行了这段代码,它将输出 320,但我想知道它是否有效
#include <stdio.h>
int main()
{
auto int a = 5;
int x ;
x = ~a + a&a+a<<a;
printf("%d",x);
}
最佳答案
使用 C 运算符优先级表,您可以使用括号将该表达式分解为更小的部分。
x = ~a + a&a+a<<a;
// Is equivalent to:
x = ((~a) + a) & ((a + a) << a);
关于c - 我已经运行了这段代码,它将给出输出 320 我想知道这段代码是如何工作的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51708871/