posts - 43,  comments - 9,  trackbacks - 0
1. 如果其中一个操作数为long double类型,则另一个操作数被转换为long double.
2. 否则,如果其中一个操作数为double, 则另一个操作数被转换为double.
3. 否则,如果其中一个操作数为float, 则另一个操作数也转换为float.
4. 否则,两个操作数进行 "整型升级":
    a. 如果其中一个操作数为unsigned long int, 则另一个操作数也被视为unsigned long int.
    b. 否则,如果其中一个操作数为long int,而另一个操作数类型是unsigned int, 并且long int能够表示unsigned int的所有值,则另一个操作数也被视为long int;如果long int不能表示unsigned int的所有值,则两个数都被视为unsigned long int.
    c. 否则, 如果其中一个操作数是long int,则另一个操作数也被视为long int.
    d. 否则, 如果其中一个操作数是unsigned int, 则另一个操作数也被视为unsigned int.
    e. 否则, 两个操作数都被视为int.
posted on 2009-10-27 10:05 wolf5x 阅读(149) 评论(0)  编辑 收藏 引用 所属分类: c/c++

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


<2009年10月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

"Do not spend all your time on training or studying - this way you will probably become very exhausted and unwilling to compete more. Whatever you do - have fun. Once you find programming is no fun anymore – drop it. Play soccer, find a girlfriend, study something not related to programming, just live a life - programming contests are only programming contests, and nothing more. Don't let them become your life - for your life is much more interesting and colorful." -- Petr

留言簿(3)

随笔分类(59)

随笔档案(43)

cows

搜索

  •  

最新评论

评论排行榜