在程式設計上,下列何者最適於利用物件導向的類別繼承(inheritance)機制來解決?
(A)無窮的迴圈(infinite loops)
(B)擺盪的指標(dangling pointers)
(C)未初始化的使用(use before initialization)
(D)抽象資料型態的重覆使用(reuse of abstract data types)
在分時(time-sharing)作業系統中,如果程序A 的時間區段(time slot)耗盡,因而將執行切換至另一程序B 時,程序A 將會進入何種狀態(state)?
(A)waiting state
(B)ready state
(C)terminated state
(D)running state
下列電路何者在邊緣觸發(edge trigger)時,才會改變其輸出?
(A)由兩個反或閘(NOR gate)交叉連結而成的SR 閂(SR latch)
(B)由兩個反及閘(NAND gate)交叉連結而成的SR 閂
(C)具閘控之SR 閂(SR-latch with control input)
(D)主僕式SR 正反器(master-slave SR flip-flop)
學生的資料表中,包含(學號、名字、年紀)三個欄位。假設學生資料表先依照年紀去作排序,然後再依照年紀去索引,這樣的索引方式是屬於下列的那一種類型?
(A)主要索引、非群集(Primary and uncluster)
(B)主要索引、群集(Primary and cluster)
(C)次要索引、非群集(Secondary and uncluster)
(D)次要索引、群集(Secondary and cluster)
下列以C 程式語言撰寫之程式執行後產生之輸出為何?#include <stdio.h>int main(){int a = 64, b = 1;printf("%d", a >> (1+(b<<2)));return 0;}
(A)0
(B)1
(C)2
(D)4
執行下列C 語言程式後,產生的輸出為何?#include <stdio.h>int f (int a, int b) {return a+b;}int g (int a, int b) {return a-b;}int h (int a, int b) {return a*b;}main() {int x =5, y =2;printf(“%d\n”, h(f(x,y), g(x,y)));}
(A)7
(B)3
(C)10
(D)21
下列SQL 語法何者錯誤?
(A)select count(*) from students
(B)select MAX(age) from students
(C)select name, MAX(age) from students
(D)select name, MAX(age) from studentsgroup by name
下列以C 程式語言撰寫之程式中,(A)(B)(C)分別可填入下列何種敘述,使其成為一個合乎語法之程式?#include <stdio.h>int main(){int num;int* p = (A), p2 = (B);*p = (C);return 0;}
(A)
(A) num
(B) num
(C) num
(B)
(A) &num
(B) &num
(C) num
(C)
(A) &num
(B) &num
(C) &num
(D)
(A) &num
(B) num
(C) num
下列關於快取記憶體(cache)的改善方法,何者錯誤?
(A)增加快取記憶體的集合關聯性(set associativity)可以縮短其存取時間(access time),但會增加衝突錯失(conflict miss)的情形
(B)增加快取記憶體的容量可以減少capacity miss 的情形,但會增加其存取時間
(C)由小至大逐漸增加快取記憶體的區塊大小(block size)能減少miss rate 的發生,但區塊太大會有反效果
(D)增加快取記憶體的階層數(levels of caches)可以有效降低其miss penalty
下列以C 程式語言撰寫之程式執行後產生之輸出為何?#include <stdio.h>main(){int x = 007, y = 010;if ( ++x >= y-- ) { if (y = x < 0) x = y + 4; }else x = x + 3;printf(“%d\n”,x – y );}
(A)0
(B)2
(C)4
(D)8