程式語言 - 考試

Table of Contents

其實這題目大一的程式設計期中考常常出

考的是operator的優先權

以下是我用VS2010寫出來的

有些地方跟題目不太一樣

是按照我認為他要表達的精神去寫的

http://ppt.cc/1AL7

如有錯誤敬請賜教

--

All Comments

Olive avatarOlive2014-01-02
我用dev c++跑出來是12所以非常困窘@_@
Ophelia avatarOphelia2014-01-04
Yedda avatarYedda2014-01-07
就undefined behavior,出題的人很無聊
Blanche avatarBlanche2014-01-11
不同compiler會對這樣的expression有不同解
Callum avatarCallum2014-01-12
ANSI C ISO 9899:1999有說明這種行為
Daniel avatarDaniel2014-01-15
(*n) 原題有括號