熱門推薦罰單破解實戰交通警察名師 25 年經驗,親授警察臨檢、檢舉魔人、科技執法、車禍糾紛的執法邏輯看課程介紹
購物車我的課程我的書籤免費註冊
資訊處理·96·程式語言概要1/5

資訊處理 96程式語言概要考古題

5 題申論題資料來源:考選部下載 .txt
跨年同科91-115
115制度上該年沒有本科114制度上該年沒有本科113制度上該年沒有本科112制度上該年沒有本科111制度上該年沒有本科110制度上該年沒有本科109制度上該年沒有本科1084107410661050 題104510351020 題101510059959849789610955941093592制度上該年沒有本科91制度上該年沒有本科

題目為考試當年公告版本,實務標準請以現行規範為準。

試題5
96
1

請用中文描述下列文法所定義的語言:(20 分) <S> -> <A> <B> <C> <A> -> a<A> | a <B> -> b<B> | b <C> -> c<C> | c

96
2

命令語言(imperative language)中的變數(variable)是電腦什麼元件的抽象描述? (10 分)

96
3

有下列JAVA 程式片段,請寫出執行結果。(20 分) String s4 = new String(“restful”) ; String s5 = new String(“restful”) ; String s6 = new String(“peaceful”) ; String s7 = s4 ; String s8 = “restful” ; String s9 = “restful” ; System.out.println(s4.equals(s5)) ; System.out.println(s4.equals(s6)) ; System.out.println(s4 == s5) ; System.out.println(s4 == s7) ; System.out.println(s4 == s8) ; System.out.println(s8 == s9) ;

96
4

有下列Java 虛擬碼片段: try {statement-list1} catch (exception-class1 variable1) {statement-list2} catch (exception-class2 variable2) {statement-list3} finally {statement-list4} ㈠若try 區段無exception 產生,請依序指出那些statement list 會被執行。(10 分) ㈡若try 區段有exception-class1 的exception 產生,請依序指出那些statement list 會 被執行。(10 分) ㈢若try 區段有exception-class2 的exception 產生,請依序指出那些statement list 會 被執行。(10 分) 96 年公務人員特種考試關務人員考試試題 科 別: 資訊處理

96
5

輸入34 於下列getBinary 遞迴程式,請問回傳值為何?(20 分) /** getBinary returns a String representation of the binary * equivalent of a specified integer n. * The worstTime(n) is O(log n).* * @param n – an int in decimal notation. * @return the binary equivalent of n, as a String * @throws IllegalArgumentException, if n is less than 0 */ public static String getBinary (int n) { if (n < 0) throw new IllegalArgumentException( ); if (n <= 1) return Integer.toString (n); return getBinary (n / 2) + Integer.toString (n % 2) } // getBinary

同年其他科目96 · 22