The output is 0 when int a = 1 == 0; because the expression evaluates as follows: The comparison operator == has higher precedence than the assignment operator =. 1 == 0 evaluates to false, which is implicitly converted to 0. This value 0 is then assigned to a. Thus, a becomes 0.