國立臺中教育大學 100 學年度大學日間部轉學招生考試
計算機導論試題
適用學系:資訊科學學系 二、三年級 一、單選題: 20% 1. 以下何者為 C++所不支援的? A. classes B. global functions C. automatic garbage collection D. support for object oriented programming E. traditional programming techniques 2. 以下算式的計算結果為何? 20.0 * (9 / 5) + 32.0 A. 68.0 B. 52.0 C. 32.0 D. Incorrect expression, the / should be % E. Incorrect expression, so there is no value 3. 在 switch 的敘述區塊中,當碰到 break 敘述句時,控制權會立即跑至下列何處? A. a GOTO statement B. the else clause C. the default case of the switch statement D. the statement beyond the end of the switch statement. E. 以上皆非 4. 以下迴圈的寫法,何者會確保迴圈主體(body)會至少被執行一次? A. do body while (control); B. while (control) body; C. for (initialize; test; update) body; D. 以上皆非 E. 以上皆是 5. C++中,structure 或是 class 的成員是用種運算子進行存取? A. Comma operator B. Equal operator C. The indexing operator D. The ampersand operator E. The dot operator 6. 以下何者不是 C++函式庫內函式的名稱? A. abs B. sqrt C. floor D. labs E. random 7. 請問在 C++程式中,何處不能進行變數宣告?A. Within the argument list of a function call B. Within the parameter list of a function definition C. Within the block of a void function D. Within a block nested within another block E. Within the block of a value returning function 8. 在 C++中,陣列的索引值必須為 A. A float type B. Positive C. Less than or equal to the declared size of the array D. Non‐negative E. 以上皆為錯誤 9. 考慮下列的程式碼: 在呼叫完 One(j, k)後,請問 j 和 k 的值為多少? A. j == 4, k == 3 B. j == 4, k == 18 C. j == 17, k == 18 D. j == 17, k == 3 E. j == 4, k == 5 10. 請問下列程式碼的輸出為何? (假設此程式是嵌在一個正確而完整的程式之中) A. ecko followed by a character from an out of bounds access. B. kceg followed by a character from an out of bounds access. C. okceg D. gecko E. Correct answer no listed.
void One( int first, int & second ) { first = 17; second = first + 1; } int main() { // other code ... int j = 4; int k = 3; One(j, k); // other code .. }
char letter[5] = {'o', 'k', 'c', 'e', 'g'}; for(int i = 4; i >= 0; i-- )
cout << letter[i]; cout << endl;
二、填充題:20%
1. OSI 網 路 模 型 分 有 七 層 , 分 別 為 實 體 層 (Physical Layer) 、 __________ 、 __________ 、 __________ 、 __________ 、 __________ 及 應 用 層 (Application Layer)。(5%)
2. 請列舉五種資料庫模式(database model)。(5%)
3. 二元樹裡有「前序法(preorder)」、「中序法(inorder)」及「後序法(postorder)」 等三種表示方式。請將此中序式 a-b/d-c*d 轉換成後序式。(5%)
4. 邏輯函數F ABBCDABDACDABDACABCDBCDABCD之最簡化
的積項之和(Sum Of Product)為何? (5%) 三、問答題:60% 1. 配發 IP 的方式是依據 RFC-769 文件所制定的五種 IP Class 網路等級,請說明 各網路等級之 32-bit IP 位址開頭配置方式、代表網路位址與主機位址之位元長 度以及 IP 範圍。(10%) 2. 請說明 TCP 與 UDP 之差異並各列舉三項應用層協定之應用。(10%) 3. 請問下列式子中((a)~(e)),各變數被指派的內容值為何?並請解釋原因。(10%) int x, y; (a) x = 1 / 2; (b) y = 3.0 / 2.0; double z, w, t; (c) z = 1 / 2; (d) w = 6 / 4; (e) t = 5.0 / 2.0; 4. 請寫出 Bubble sort 演算法的虛擬碼。(10%) 5. 請寫出下列數字於不同進位系統間的轉換:(10%) (573.64)10 = ( )2, (F432.BC)16 = ( )8 6. 請寫出下列縮寫的全名:(10%) ASCII, SRAM, CPU, RISC, SIMD