所屬科目:1.程試設計;2.資料庫系統;3.資訊網路工程;4.計算機結構
1. 執行下列 C 語言程式片段後,變數 x 的值為何?
(A)334 (B)350 (C)366 (D)364
2. 執行下列 JAVA 程式片段,輸出結果為何?(A)-5 (B)5 (C)4 (D)6
4. 執行下列程式片段後,變數 z 的值為何?
(A)0 (B)1 (C)2 (D)3
5. 在下列程式片段,“x++”執行幾次?
(A)0 (B)1 (C)5 (D)無限次
6. 在下列程式片段,“x++”執行幾次?
(A)5 (B)10 (C)15 (D)25
31. 參考下面 JAVA 片段程式碼,選項中的方法何者放在 class B 不會產生編譯錯誤 (A)public int getQuotient (int i) throws ArithmeticException{return 20/i;} (B)public double getQuotient (double d1, double d2) throws ArithmeticException{return d1/d2;} (C)public int get (int i, int j) throws RuntimeException {return i/j;} (D)public int getQuotient (int d1, int d2) {return d1/d2;}
33. 參考下列 C 語言程式片段,下列何者可以取得變數 x 的值? (A)ptr (B)x (C)*x (D)*ptr