第 1 頁,共 4 頁 ,
國立台中教育大學 95 學年度大學日間部轉學招生考試
計算機概論
(含程式設計、資料結構)
適用學系:資科系
一、選擇題(每題 2 分,共 50 分,25 題)
1.十進制的 12.25 轉換成二進制的表示法為何? ○1 110.01 ○2 110.10 ○3 1100.10 ○4 1100.01 2.電腦系統內的浮點表示法,通常如何表示? ○1 浮點表示法=符號+指數+尾數 ○2 浮點表示法=指數+尾數+符號 ○3 浮點表示法=指數+符號+尾數 ○4 浮點表示法=符號+尾數+指數 3.在邏輯運算中,只有在兩個運算元之值相異時,其結果才為真值的是下列哪 一種運算?○1 OR 運算 ○2 AND 運算 ○3 NOR 運算 ○4 XOR 運算
4.試計算邏輯運算 (A+B) + (A’•B’) 的結果. ○1 0 ○2 1 ○3 -1 ○4 不一定 5.物件導向技術中的三大特性為何? ○1 封裝(encapsulation)、繼承(inheritance)、類別(class) ○2 封裝(encapsulation)、繼承(inheritance)、多元性(polymorphism) ○3 類別(class),繼承(inheritance),多元性(polymorphism) ○4 以上皆非 6.電腦執行一個指令,需完成哪些步驟(請依序列出)。 ○1 提取指令,指令解碼,執行運算,提取運算元,存放結果。 ○2 提取指令,指令解碼,提取運算元,執行運算,存放結果。 ○3 提取指令,提取運算元,指令解碼,執行運算,存放結果。 ○4 提取指令,執行運算,提取運算元,指令解碼,存放結果。 7.電腦指令定址(addressing)方法中的間接定址(indirect addressing),其有 效位址如何取得? ○1 有效位址即為運算元欄之值 ○2 有效位址為運算元欄所指另一位址的內含值 ○3 有效位址為運算元欄與 PC 內含值相加所得 ○4 有效位址為運算元欄之值減去目前記數器內的值
8.Which of the following data structures are linear lists?
第 2 頁,共 4 頁 ,
9.Give the preorder traversal sequence of the following tree?
○1 A1, A2, A3, A4, A5, A6 ○2 A1, A2, A4, A3, A5, A6
○3 A1, A2, A4, A5, A3, A6 ○4 A1, A2, A4, A5, A6, A3
10.What is the result of FIB(7) based on the Fibonacci Sequence definition?
FIB(N) = N, if N=0 or N=1
FIB(N) = FIB(N-2) + FIB(N-1), if N >=2 ○1 8 ○2 13 ○3 21 ○4 34
11.C 語言描述下列何者錯誤?
○1 (x = = y)測試左右兩邊的值是否相等,表示 x 的值等於 y 的值的判斷式
○2 x =y 將 y 的值 assign 給 x
○3 function 的 return data type 為 void 表示不傳回值,int 表示傳回型態
為整數
○4 %f 為輸出入格式化使用,表示 int 資料型態
12.下面程式片段使指標變數 P 指向一存儲型變數的動態存儲空間 int *P; P =___ malloc(sizeof(int));其中___應填入 ○1 int ○2 int * ○3 (*int) ○4 (int *)
13. main() {
int i, x[3][3]={9, 8, 7, 6, 5, 4, 3, 2, 1}, *p=&xs[1][1]; for(i=0; i < 4; i = i+2) printf(“%d ”, p[i]);
} 以上程式的輸出結果為: ○1 5 2 ○2 5 1 ○3 5 3 ○4 9 7 14. int x=10,y=0; if(x>=0) if(x==0) y=1; else y=-1; printf("%d",y); 上列程式段的輸出結果為: ○1 1 ○2 10 ○3 0 ○4 -1
第 3 頁,共 4 頁 , 15.下列指令哪個不正確?
○1 a+x = x; ○2 a= a+x; ○3 c = a%b; ○4 z = z/y;
16.In IEEE 802.11, _____ provide access to the distribution system via the wireless medium for associated stations.
○1 access points ○2 base stations
○3 coordination functions ○4 data sets
17.If there are 200 nodes to be stored in a binary tree, the minimum height of the tree is
○1 7 ○2 8 ○3 9 ○4 greater than 10
18.At the Cyclic Redundancy Check (CRC) checker, _______ means that the data unit is damaged.
○1 a string of alternating 1s and 0s ○2 a nonzero remainder
○3 a string of 0s ○4 a string of 1s
19.The sequence to traverse a tree with pre-order traversal is ____. ○1 left sub-tree, right sub-tree, the node
○2 left sub-tree, the node, right sub-tree
○3 the node, left sub-tree, right sub-tree
○4 right sub-tree, left sub-tree, the node
20.The solution of the recurrence relation T(2n) =2T(n) + O(n), T(2)=1
is?
○1 O(n) ○2 O(nlogn) ○3 O(2n) ○4 O(n2)
21.The _____ holds the address of the next instruction to be executed. ○1 status register ○2 program counter
○3 condition register ○4 instruction register
22.Which of the following layer of the TCP/IP protocol hierarchy handles framing?
○1 data link ○2 physical ○3 network ○4 application
23.Assigning port numbers to programs and remembering which program goes with which port is a part of the _____ layer protocols.
○1 physical ○2 data link ○3 network ○4 transport
24.If a Turing machine program consists of the following four instructions: (1,0,1,2,R)→(1,1,0,2,R)→(2,0,0,2,R)→(2,b,b,2,L) then which of the following is a halting configuration?
○1 b 1 1 b b b ... (current state = 2, symbol 1 is being read),
○2 b 1 1 b b b ... (current state = 1, symbol 1 is being read),
○3 b 1 0 b b b ... (current state = 1, symbol 0 is being read),
第 4 頁,共 4 頁 ,
25.Suppose the current state in a Turing machine is 1, and the current symbol is 0, and that (1,0,1,2,R) (1,0,0,3,L) both appear in the same collection of instructions. Then the machine _____.
○1 would proceed as normal
○2 has a conflict
○3 would fix the problem and continue
○4 would eliminate one of the instructions
二、問答及程式設計(每題 10 分,共 50 分,5 題)
1.Please describe the four compilation process steps and their functions in detail. (10 分)
2.請利用 C/C++語言寫一個程式,該程式輸入兩個正整數,並輸出這兩個數字 的最大公因數。(10 分)
3.Build a minimum cost spanning tree T by adding edges to T one at a time for the following graph. What is the time complexity? (10分)
0
1
2
3
4
5
6
20 16 12 9 8 15 9 10 187
5 110
1
2
3
4
5
6
20 16 12 9 8 15 9 10 187
5 114.Please correct the following C program segment:(10 分) char str[80];
printf(“Please input your name”); scanf(“%c”, &str);
printf(“your name is %s”, str);
5. Write a procedure for inserting a node from a binary search tree? (10 分)