阿摩線上測驗
登入
首頁
>
程式語言
>
103年 - 103 高等考試_三級_資訊處理:程式語言#24840
>
題組內容
二、參考下述 BNF grammar
S → S + S | S - S | S * S | S / S | ( S ) | a
請回答總共有幾個不同的剖析樹(parse tree)可得到下列結果。本題不需畫出剖析樹,但請說明。(每小題 5 分,共 20 分)
4.(a + (a + a)) + a
其他申論題
一、請說明 early binding(如 C 語言)及 late binding(如 Perl 語言)之間最大的差異,並列出兩者主要的優點。(10 分)
#32484
1.a + a * a
#32485
2.a + a * a / a
#32486
3.a + a + a + a
#32487
1.Y is passed by value.
#32489
2.Y is passed by reference.
#32490
一、請比較類別(class)的使用者觀點(user view)及開發者觀點(developer view) 的差異。(10 分)
#32491
二、請寫出下列敘述的正規表達式(regular expression): “Each word must start with two digits, followed by a upper case letter, and then followed by at least one letter either upper case or lower case.” (10 分)
#32492
三、請問下列 Java 程式執行結果為何?(10 分) import java.io.IOException; public class throwException { public static void main(String[] args) throws E { try {E e1 = new E(“here comes e1”); throw e1; System.out.println(“gets here”); } catch(E e1) { System.out.println(“catches e1”);} }//main }//throwException class E extends IOException { E(String message) { super(message); } }// class E
#32493
四、請問下列 Java 程式輸出為何?(10 分) public class C6 { public static void main(String[] args) { int [] a = new int[2]; int [] b = new int[2]; a[0] = 6;b[0] = 6;a[1] = 7;b[1] = 7; System.out.println(a.equals(b)); }}
#32494