自增自减运算完遇到短路与短路或是不是输出的时候就不算自增自减了耶?
请问你在说什么
不知道你说的自增自减在逻辑短路计算的哪部分。其中lhs是始终会计算的,只是rhs的计算根据rhs的值可能会被跳过。
From https://en.cppreference.com/w/c/language/operator_logical
Logical AND
lhs && rhs
There is a sequence point after the evaluation of lhs. If the result of lhs compares equal to zero, then rhs is not evaluated at all (so-called short-circuit evaluation)
Logical OR
lhs || rhs
There is a sequence point after the evaluation of lhs. If the result of lhs compares unequal to zero, then rhs is not evaluated at all (so-called short-circuit evaluation)