看板 NTUGIEE_EDA 關於我們 聯絡資訊
這些只是好玩而已,別太認真啊! team work 寫這種 code 的人該死... 如果 standard 沒寫清楚,那結果是由 compiler 決定 :P ※ 引述《gwliao (gwliao)》之銘言: : 那考考大象好了 : 請在不用電腦的情況下作答, : 因為這些一run程式就結果就出來了! : 1. : int a=5,b=7; : printf("%d\n", a+++b); : What is the answer? : 2. : unsigned int a; : int b; : a=6; : b=-20; : if( (a+b)>6 ) : printf("a+b>6\n"); : else if( (a+b)<6 ) : printf("a+b<6\n"); : else : printf("a==b\n"); : What is the answer? : 3. : int a=5; : printf("%d %d %d %d\n",a++,++a,a++,++a); : What will be printed? : 要答案的人, 請自己run程式 :P : 我只掛第三題, 只能說真陰險.......Orz -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.25.204
gwliao:1是standard有定義, 2我記得也是有! 3:我記得沒有140.112.230.224 07/02
gwliao:寫這三種當中任何一種的人要被"阿"到死!140.112.230.224 07/02
gwliao:這些是我程式設計時"烤"的題目(不包含三)140.112.230.224 07/02
yellowfishie:暗黑程式 XD 140.112.25.218 07/02
Donnie:出題老師該被阿嗎?... 140.112.25.204 07/02
moonshade:大一記蓋很喜歡出這種鬼東西 203.203.83.73 07/02
moonshade:老師無聊沒東西可考... 203.203.83.73 07/02
gwliao:還好不是我出的, 不要阿我! :O140.112.230.224 07/02
gwliao:這三個是一個印度阿三出的, 用來試試新人140.112.230.224 07/02
gwliao:試試新人對語法的了解!......140.112.230.224 07/02