一道c语言运算符优先级问题 #include <iostream> using namespace std; int main() { char test[] = {"This is testing."}, *p = test; int i,j; i = 2,j=5; //print cout<<*p<<*p++<<endl; // 输出为 : h T cout<<i<<j<<endl; //输出为:…
零. 优先级 在C++ Primer一书中,对于运算符的优先级是这样描述的: Precedence specifies how the operands are grouped. It says nothing about the order in which the operands are evaluated. 意识是说优先级规定操作数的结合方式,但并未说明操作数的计算顺序.举个例子: 6+3*4+2 如果直接按照从左到右的计算次序得到的结果是:38,但…