[問題] c語言的判斷式問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
c
問題(Question):
99高大計算機概論考題
Complete the following C statement so that the value of X will be 2
if it is 0 before executing the statement, and it will be 0
if it is 2 before the execution.
X = ;
我自己是這樣寫的x=(x+2 == 2) ?2 :0
可題目寫說before the execution
這樣到底對不對啊???
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.254.115.21
推
02/09 21:20, , 1F
02/09 21:20, 1F
→
02/09 21:22, , 2F
02/09 21:22, 2F
→
02/09 21:52, , 3F
02/09 21:52, 3F
→
02/09 22:31, , 4F
02/09 22:31, 4F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章