开发者

meaning of this code [closed]

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.


Output is 1

If you want more help we can give you

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜