C语言中,z=x a%3*(int)(x y)%2/4;的运算顺序是什么?谢谢!

[复制链接]
查看11 | 回复1 | 2011-3-7 07:47:48 | 显示全部楼层 |阅读模式
回复

使用道具 举报

千问 | 2011-3-7 07:47:48 | 显示全部楼层
<pre id=\"best-answer-content\" class=\"reply-text mb10\">z=x a%3*(int)(x y)%2/4;

1. x y
2. (int)(x y)
3. a%3
4. a%3*(int)(x y)
5. a%3*(int)(x y)%2
6. a%3*(int)(x y)%2/4
7. x a%3*(int)(x y)%2/4

如果是你自己写程序,强烈建议不要写这种“令人困惑的C”,如果是考试,就另当别论了。











参考资料:<span class=\"gray\"><a href=\"http://zhidao.baidu.com/question/142499263.html?an=0defds123si=2\" target=\"_blank\">http://zhidao.baidu.com/question/142499263.html?an=0defds123si=2</a></span>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行