[問題] C語言基本問題
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
int x=1; int y; y = (x++ == 1) ? 1 : 0;
The value of x and y after execution is _____.
餵入的資料(Input):
國立彰化師範大學98 學年度碩士班招生考試試題
預期的正確結果(Expected Output):
x=2,y=1
錯誤結果(Wrong Output):
答案x=1,y=2
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
為什麼是x=1y=2?
謝謝回答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 202.144.215.164
推
02/08 11:04, , 1F
02/08 11:04, 1F
→
02/08 11:05, , 2F
02/08 11:05, 2F
推
02/08 11:25, , 3F
02/08 11:25, 3F
→
02/08 11:49, , 4F
02/08 11:49, 4F
→
02/08 12:10, , 5F
02/08 12:10, 5F
→
02/08 14:13, , 6F
02/08 14:13, 6F
→
02/08 16:04, , 7F
02/08 16:04, 7F