It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and开发者_StackOverflow社区cannot be reasonably answered in its curr
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and开发者_StackOverflow社区 cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
int main()
{
int x = 2, y = 6, z = 6;
x = y == z;
printf("%d", x);
}
== has higher precedence than =, and y==z is 1.
I will end the answer there, because this looks like homework.
http://codepad.org/fp4ZYJX5
The output is:
1
Have a look at this, which explains a similar, yet more complex question and will answer yours as well.
精彩评论