int main() { int a=1,b=2,m=0,n=0,k; k=(n=b<a)&&(m=a) ; printf("%d,%d\n",k,m); return 0; }
The logical AND operator (&&) returns true if both operands are true and returns false otherwise. The operands are implicitly converted to type bool before evaluation, and the result is of type bool. Logical AND has left-to-right associativity.
The operands to the logical AND operator don't need to have the same type, but they must have boolean, integral, or pointer type. The operands are commonly relational or equality expressions.
The first operand is completely evaluated and all side effects are completed before evaluation of the logical AND expression continues.
The second operand is evaluated only if the first operand evaluates to true (nonzero). This evaluation eliminates needless evaluation of the second operand when the logical AND expression is false.