113 年 國立臺灣大學資訊管理學系碩士班《資訊科技概論》

📄 試題原卷 免費註冊後即可對照原始考卷 PDF免費註冊

第 1 題

Which of the following is not a popularly used file system?
(A) FAT32
(B) exFAT
(C) NTFS
(D) APFS
(E) all the above are popular file systems (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對常見檔案系統的認識。檔案系統是作業系統用來管理電腦儲存裝置上檔案的一種方法。

(A) FAT32 (File Allocation Table 32) 是一個廣泛使用的檔案系統,尤其在舊版 Windows 和許多可攜式儲存裝置(如 USB 隨身碟)上。
(B) exFAT (Extended File Allocation Table) 是 FAT32 的擴展,支援更大的檔案和磁碟分割區,也廣泛用於 SD 卡和 USB 隨身碟。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 2 題

Which of the following is wrong?
(A) multiprocessing allows simultaneous execution of processes on separate cores or processors
(B) in multiprocessing, two processes spawned by a parent process share their memory, stack, and program counter
(C) processes in multiprocessing can communicate through mechanisms like shared memory or message passing
(D) the main purpose of multiprocessing is to improve system throughput and performance
(E) all of the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對多程序(Multiprocessing)概念的理解。

(A) 正確。多程序利用多個 CPU 核心或處理器來同時執行多個程序,以提高效率。
(B) 錯誤。在多程序(Multiprocessing)環境中,當一個父程序產生子程序時,每個子程序通常擁有自己獨立的記憶體空間(包括程式碼、資料、堆疊)和程式計數器(Program Counter)。雖然它們可能共享部分資源(如檔案控制代碼),但記憶體、堆疊和程式計數器是獨立的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3 題

Which of the following is wrong?
(A) a thread represents an independent path of execution within a program
(B) multiple threads can run simultaneously within a single process
(C) communication between threads is more lightweight and efficient than communication between processes
(D) threads within a process sharing the same memory space
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對多執行緒(Multithreading)概念的理解。

(A) 正確。執行緒(Thread)是程序內的一個獨立執行路徑,它有自己的程式計數器、堆疊和執行狀態。
(B) 正確。在多核心處理器上,多個執行緒可以在同一時間點被分配到不同的核心上執行,實現同時執行;在單核心處理器上,作業系統透過時間切片(time slicing)讓多個執行緒輪流執行,模擬同時性。
(C) 正確。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4 題

A von Neumann architecture consists of four main components, which are:
(A) input, output, memory, processing
(B) input, output, CPU, program counter
(C) arithmetic control, logic control, register, program counter
(D) CPU, GPU, RAM, hard disk
(E) I/O, RAM, CPU, storage

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對馮紐曼(von Neumann)架構的理解。馮紐曼架構是現代計算機的基礎,其核心思想是將指令和數據儲存在同一個記憶體中,並由一個中央處理器(CPU)依序執行。

傳統上,馮紐曼架構的電腦主要由以下幾個部分組成:

  1. 中央處理器 (CPU):負責執行指令。CPU 通常包含算術邏輯單元 (ALU) 和控制單元 (Control Unit)。
  2. 記憶體 (Memory):儲存指令和數據。
  3. 輸入/輸出設備 (I/O Devices):用於與外部世界互動,例如鍵盤、顯示器。
  4. 匯流排 (Bus):連接 CPU、記憶體和 I/O 設備,用於傳輸數據和控制信號。

選項分析:
(A) input, output, memory, processing - 這是對馮紐曼架構的組成部分的描述,其中 "processing" 指的是 CPU 的功能。這是最接近正確答案的選項。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 5 題

Which of the following about stack memory in operating system is wrong?
(A) local variables of a program are stored in stack
(B) every time a function is called, the operating system allocates some stack memory for it
(C) during a program's execution, allocation and deallocation for stack memory is automatically done
(D) a stack overflow occurs when a program tries to use more memory space in the call stack than has been allocated
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對堆疊記憶體(Stack Memory)在作業系統中作用的理解。堆疊是用於儲存函數調用資訊(如參數、局部變數、返回位址)的區域,其操作遵循後進先出(LIFO)原則。

(A) 正確。函數的局部變數通常儲存在堆疊中。
(B) 正確。當一個函數被調用時,系統會在堆疊上為其創建一個「堆疊幀」(stack frame),其中包含局部變數、參數和返回位址等信息。
(C) 正確。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 6 題

Which of the following about heap memory in operating system is wrong?
(A) objects dynamically created by a program are stored in the heap memory
(B) the heap segment can suffer from fragmentation
(C) memory allocated on the heap persists until explicitly deallocated by the programmer
(D) garbage collection is invoked to clean up objects in the heap that are no longer being referenced
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對堆積記憶體(Heap Memory)在作業系統中作用的理解。堆積用於動態記憶體分配,其生命週期由程式設計師管理,或由垃圾回收機制管理。

(A) 正確。在許多程式語言(如 C++, Java, Python)中,使用 new 或 malloc 等關鍵字動態創建的物件或數據結構,其記憶體是從堆積中分配的。
(B) 正確。堆積分配和釋放的過程可能導致記憶體碎片化(fragmentation)。當小塊的已分配記憶體和未分配記憶體交錯存在時,即使總的可用空間足夠,也可能無法分配一個較大的連續記憶體塊。
(C) 錯誤。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 7 題

Which of the following about interrupt in a computer is wrong?
(A) an interrupt is a signal to the processor that an event has occurred, requiring its attention
(B) when an interrupt occurs, the usual procedure is for the processor to save its state by pushing its registers and program counter onto the stack
(C) in a polled interrupt system, the interrupting device directs the processor to the appropriate interrupt service routine
(D) interrupts can be assigned priorities to allow a higher priority one to "interrupt" lower priorities
(E) all of the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對中斷(Interrupt)機制的理解。中斷是硬體或軟體發出的信號,用於通知處理器發生了需要立即處理的事件。

(A) 正確。中斷是一個信號,表明有某個事件(硬體故障、I/O 完成、定時器到期等)發生,需要處理器暫停當前任務來處理這個事件。
(B) 正確。當處理器接收到一個中斷請求時,為了能夠在處理完中斷後恢復到原來的執行狀態,它通常會將當前 CPU 的狀態(包括程式計數器 PC、通用暫存器等)保存到堆疊(stack)中。
(C) 錯誤。在「輪詢」(Polled)系統中,CPU 會週期性地檢查各個設備是否需要服務。當 CPU 檢查到設備需要服務時,CPU 才知道要執行哪個服務例程。這與中斷不同。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 8 題

Amdahl's law is used in parallel computing to formulate the theoretical speedup when using multiple processors. Let p be the fraction of a task that is unaffected by adding more processors, and n is the number of processors used to speed up the task.
Then the theoretical speedup of the execution of the whole task is
(A) 1p+1−pn\frac{1}{p + \frac{1-p}{n}}
(B) 1(1−p)+pn\frac{1}{(1-p) + \frac{p}{n}}
(C) 1−pn+p\frac{1-p}{n} + p
(D) n(1−p)p\frac{n(1-p)}{p}
(E) pn\frac{p}{n}
none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對 Amdahl's Law 的理解。Amdahl's Law 用於計算在並行計算中,增加處理器數量後,理論上能達到的最大加速比。

Amdahl's Law 的公式為:
S(n)=1(1−f)+fnS(n) = \frac{1}{(1-f) + \frac{f}{n}}
其中:

  • S(n)S(n) 是使用 nn 個處理器時的加速比。
  • ff 是可以被並行化的任務分數(fraction of the task that can be parallelized)。
  • nn 是處理器的數量。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 9 題

Which of the following is wrong about mutual exclusion in operating system?
(A) mutual exclusion is used to ensure that a shared resource can be accessed by only one process at a time
(B) if not designed properly, a mutual exclusion mechanism may result in starvation
(C) if not designed properly, a mutual exclusion mechanism may result in deadlock
(D) if not designed properly, a mutual exclusion mechanism may result in livelock
(E) all of the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對作業系統中互斥(Mutual Exclusion)概念的理解,以及其可能導致的問題。互斥是為了保護共享資源,確保同一時間只有一個進程(或執行緒)可以訪問。

(A) 正確。互斥的核心目的是確保共享資源(如印表機、共享檔案、數據結構)的原子性訪問,防止多個進程同時修改導致數據不一致。
(B) 正確。飢餓(Starvation)是指一個進程因為某些原因(例如,總是無法獲得所需資源,因為其他進程優先級更高或機制設計不當)而長時間無法執行。不當設計的互斥機制,如優先級繼承(priority inheritance)的死鎖處理不當,或簡單的先來先服務(FCFS)如果資源被頻繁釋放給高優先級進程,低優先級進程可能陷入飢餓。
(C) 正確。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 10 題

____ refers to the process of temporary storage of data for use and execution by a device, program, or system. Data is sent to and stored in main memory or other storage until it is requested for execution by a program or computer.
(A) pipelining
(B) spooling
(C) buffering
(D) stacking
(E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念
本題考查的是作業系統與資源管理中的 暫存 (temporary storage) 機制,特別是資料在被實際執行或輸出之前,先存放於記憶體或磁碟之中的概念。相關定義:

  • Spooling(Simultaneous Peripheral Operations On‑Line):將資料暫存於磁碟或記憶體,待外部裝置(如印表機、磁帶機)空閒時再取出執行。屬於 批次排程 的一部份,常用於列印、批次檔案處理等情境。
  • Buffering(緩衝):在資料流動的兩端提供暫時的容納空間,以平衡產生速度與消費速度的差異,常見於 I/O 流程、網路傳輸。
  • Pipelining(管線化):在 CPU 或資料處理系統中,將指令或資料分段同時處理,以提高吞吐量。
  • Stacking(堆疊):資料結構概念,遵循 LIFO(後進先出)原則,常用於函式呼叫、記憶體管理等。

解題方法

  1. 先閱讀題幹:「temporary storage of data for use and execution by a device, program, or system」以及「Data is sent to and stored in main memory or other storage until it is requested for execution」。
  2. 判斷關鍵字 「until it is requested for execution」,說明資料在被真正使用前僅是等待排程,符合 Spooling 的特性。
  3. 檢視其他選項的定義,排除不符合「等待執行」概念的答案。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 11 題

Which of the following is wrong about cookies?
(A) cookie is stored both on user's computer and host website
(B) cookies are created and updated when user visit websites
(C) first-party cookies are generated by the visited website
(D) third-party cookies are generated by domains separate from the primary website visited
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對網頁 Cookie 的理解。Cookie 是一種儲存在使用者瀏覽器中的小型文本文件,用於記錄使用者在網站上的資訊。

(A) 錯誤。Cookie 主要儲存在使用者的電腦(瀏覽器)上,而不是「同時」儲存在主機網站上。主機網站(伺服器)會將 Cookie 發送給瀏覽器,瀏覽器再將其儲存。當瀏覽器再次訪問該網站時,會將儲存的 Cookie 發送回伺服器。因此,Cookie 的儲存位置是使用者端(瀏覽器),伺服器端僅持有 Cookie 的副本或在伺服器端記錄相關資訊。將 Cookie 說成「儲存在用戶電腦和主機網站」是不精確的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 12 題

Which of the following is wrong about Domain Name System (DNS)?
(A) DNS is a hierarchical naming system
(B) DNS is a centralized naming system
(C) DNS translates human readable names (for example, www.im.ntu.tw) to machine readable IP addresses
(D) .tw is a top-level domain
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對網域名稱系統(DNS)的理解。DNS 負責將人類可讀的網域名稱轉換為機器可讀的 IP 位址。

(A) 正確。DNS 採用層次結構(hierarchical)的命名方式,從根節點(.)開始,向下延伸到頂級域(TLD,如 .com, .org, .tw),再到二級域(如 ntu.edu.tw),最後到主機名(如 www.im.ntu.tw)。
(B) 錯誤。DNS 是一個分散式(distributed)的命名系統,而不是集中式的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 13 題

Which of the following is wrong about proxy servers?
(A) it can help prevent cyber attacks
(B) it can help improve performance
(C) proxy servers can serve as content filtering
(D) a forward proxy shields servers by handling client requests, ensuring they reach the right server, and returning the results to clients, who are unaware of the server's direct involvement
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對代理伺服器(Proxy Server)功能的理解。代理伺服器位於客戶端和目標伺服器之間,充當中間人。

(A) 正確。代理伺服器可以作為防火牆的一部分,過濾惡意流量,隱藏內部網路結構,從而幫助防止網路攻擊。
(B) 正確。代理伺服器可以緩存(cache)經常訪問的網頁內容。當多個客戶端請求相同內容時,代理伺服器可以直接從緩存提供,減少對原始伺服器的請求,從而提高訪問速度和效率。
(C) 正確。代理伺服器可以配置內容過濾規則,阻止訪問不當網站或下載特定類型的內容,實現內容過濾。
(D) 錯誤。選項描述的是 反向代理(Reverse Proxy) 的功能,而不是正向代理(Forward Proxy)。
* 正向代理(Forward Proxy):位於客戶端網路內部,代表客戶端向外部伺服器發起請求。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 14 題

Which of the following is wrong about information security?
(A) 'C' in CIA triad refers to confidentiality
(B) 'A' in CIA triad refers to availability
(C) information security management describes the set of policies and procedural controls that IT and business organizations implement to secure their informational assets against threats and vulnerabilities
(D) ISO/IEC 27000-series provides best practice recommendations on information security management
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對資訊安全基本概念的理解,特別是 CIA 三要素和相關標準。

(A) 正確。CIA 三要素是資訊安全的核心原則,分別是:Confidentiality(機密性)、Integrity(完整性)、Availability(可用性)。C 代表機密性,確保資訊僅被授權人員訪問。
(B) 正確。A 代表可用性(Availability),確保授權使用者在需要時能夠訪問資訊和系統。
(C) 正確。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 15 題

Which of the following is wrong about access control in information security?
(A) identification is an assertion of who someone is or what something is
(B) authentication is the act of verifying a claim of identity
(C) accountability determines what informational resources a user is permitted to access and what actions he/she will be allowed to perform
(D) role-based access control assigns permissions to users based on their role within an organization.
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對資訊安全中存取控制(Access Control)相關術語的理解。存取控制是確保只有授權使用者或系統能夠訪問特定資源的機制。

(A) 正確。識別(Identification)是使用者聲稱自己是誰的過程,通常通過提供一個唯一的識別符(如用戶名、帳號)來實現。
(B) 正確。認證(Authentication)是驗證使用者聲稱的身份是否真實的過程,例如通過密碼、生物特徵、安全令牌等。
(C) 錯誤。選項 (C) 描述的是 授權(Authorization) 的概念,而不是問責制(Accountability)。
* 識別(Identification):聲稱你是誰 (Who are you?)

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 16 題

Which of the following is wrong about public key infrastructure (PKI)?
(A) PKI uses public-key encryption
(B) a registration authority stores, issues, and signs the digital certificates
(C) digital certificate is used to prove the validity of a public key
(D) RSA is an asymmetric encryption
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對公鑰基礎設施(PKI)及其相關概念的理解。PKI 是一個用於管理數位憑證和公鑰加密的框架。

(A) 正確。PKI 的核心是基於公鑰加密(Public-Key Cryptography),也稱為非對稱加密,它使用一對密鑰:公鑰和私鑰。
(B) 錯誤。在 PKI 中,憑證授權中心(Certificate Authority, CA) 負責儲存、簽發和簽署數位憑證。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 17 題

Which of the following is wrong about Hypertext Transfer Protocol Secure (HTTPS)?
(A) Transport Layer Security (TLS) is a cryptographic protocol designed to provide secure communication over a computer network
(B) HTTPS is basically an HTTP over TLS
(C) HTTPS requires a trusted third party to sign server-side digital certificates
(D) HTTPS supports a mutual authentication mode, allowing both server and client to authenticate each other
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對 HTTPS(Hypertext Transfer Protocol Secure)的理解。HTTPS 是 HTTP 協議的安全版本,用於在網路傳輸加密數據。

(A) 正確。傳輸層安全協議(Transport Layer Security, TLS)及其前身安全套接字層(Secure Sockets Layer, SSL)是設計用於在網路通信中提供安全通信的密碼學協議。
(B) 正確。HTTPS 本質上是在 TLS/SSL 層之上傳輸的 HTTP。它通過 TLS/SSL 來加密和認證 HTTP 通信。
(C) 正確。為了確保伺服器身份的真實性,HTTPS 通信依賴於伺服器端數位憑證。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 18 題

Which of the following is wrong about ACID Properties in Database Management System (DBMS)?
(A) 'A' stands for availability
(B) 'C' stands for consistency
(C) 'I' stands for isolation
(D) 'D' stands for durability
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對資料庫管理系統(DBMS)中 ACID 特性的理解。ACID 是指事務(Transaction)的四個核心屬性:原子性(Atomicity)、一致性(Consistency)、隔離性(Isolation)和持久性(Durability)。

(A) 錯誤。ACID 中的 'A' 代表 原子性(Atomicity),它保證事務中的所有操作要么全部成功執行,要么全部不執行,不存在部分完成的情況。可用性(Availability)是系統的另一項重要屬性,但與 ACID 無關。
(B) 正確。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 19 題

____ is a constraint that determines the relation of one attribute to another in a DBMS, and thus helps to maintain the quality of data in the database.
(A) inclusion dependency
(B) column dependency
(C) functional dependency
(D) join dependency
(E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對資料庫中各種依賴關係(Dependency)的理解,特別是哪一種用於維持數據品質。

(A) Inclusion Dependency(包含依賴)通常指外鍵約束(Foreign Key Constraint),它確保一個表中的某些列的值必須存在於另一個表(或同一表)的相關列中。這確實有助於維持數據品質,但它是一種具體的約束,而非描述「一個屬性與另一個屬性之間的關係」。
(B) Column Dependency(列依賴)不是一個標準的資料庫理論術語。
(C) Functional Dependency(函數依賴)是正規化理論中的核心概念。它描述了在一個關係(表)中,一個屬性集 X 的值唯一地確定了另一個屬性集 Y 的值。記為 X→YX \to Y。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 20 題

A relation is in ____ normal form if and only if no attribute domain has relations as elements.
(A) first
(B) second
(C) third
(D) closed
(E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對資料庫正規化(Normalization)中,特別是第一正規形式(1NF)的定義。

正規化是將大型表格分解為較小的表格,並定義它們之間的關係,以減少數據冗餘和提高數據完整性。

  • 第一正規形式(1NF):要求關係模式中的所有屬性都必須是原子性的(atomic)。這意味著任何屬性的值都不能是集合、列表、記錄或其他關係(表)。換句話說,每個欄位(屬性)只能包含單一的值,不能包含多個值或另一個關係作為其值。
  • 第二正規形式(2NF):要求關係模式首先滿足 1NF,並且所有非主屬性(non-prime attributes)都必須完全函數依賴於主鍵(prime key)。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 21 題

Which of the following is wrong about Object-Oriented Programming (OOP)?
(A) encapsulation describes the bundling of data and methods operating on this data into one unit
(B) a class that inherits from another class shares all the attributes and methods of the referenced class
(C) multiple inheritance allows a subclass to inherit from two or more superclasses
(D) abstract classes cannot be instantiated into objects
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對物件導向程式設計(OOP)核心概念的理解。

(A) 正確。封裝(Encapsulation)是 OOP 的一個基本原則,它將數據(屬性)和操作這些數據的方法(行為)捆綁在一起,形成一個獨立的單元(類別)。這有助於隱藏內部實現細節,並提供清晰的接口。
(B) 錯誤。一個繼承(Inheritance)自另一個類別(父類別/超類別)的子類別(Subclass)會繼承父類別的 公共(public) 和 保護(protected) 的屬性和方法,但不一定能「共享所有」屬性和方法。例如,父類別的私有(private)成員是不能被子類別直接訪問或繼承的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 22 題

Which of the following is wrong about variables in OOP?
(A) a member variable is a variable that is associated with a particular object and accessible from all of its methods
(B) a member variable must be declared within the body of a method
(C) there is only one copy of each class variable
(D) an instance variable is a variable defined in a class for which each instantiated object of the class has a separate copy
(E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考驗對物件導向程式設計(OOP)中變數類型的理解。在 OOP 中,變數通常分為成員變數(也稱為實例變數或類別變數)和局部變數。

(A) 正確。成員變數(Member Variable),也稱為實例變數(Instance Variable),是與特定物件(Object)關聯的變數。它們的值屬於該物件,並且可以被該物件的所有方法(Methods)訪問(取決於其存取修飾符,如 public, private)。
(B) 錯誤。成員變數(包括實例變數和類別變數)必須在類別的定義體內聲明,但不在方法體內。它們是類別的屬性,而不是方法的局部變數。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 23 題

GPT is the large language model behind ChatGPT. 'GPT' stands for
(A) Generative Proficiency in Text
(B) Grasping the Paradigm of Texts
(C) Generative Prowess in Text
(D) Generative Pathfinding Transformer
(E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念
本題測驗對「GPT」縮寫的正確認識。GPT(Generative Pre‑trained Transformer)是由 OpenAI 提出的以Transformer架構為基礎、經過大量語料預訓練(pre‑training)再進行特定任務微調(fine‑tuning)的**生成式(Generative)**語言模型。題目雖著重於名稱辨識,但仍涉及以下概念:

  • 生成式模型(Generative Model):能根據輸入條件產生新文字序列。
  • 預訓練(Pre‑trained):先於大量通用語料上訓練,再針對下游任務微調。
  • Transformer:由 Vaswani 等人在 2017 年提出的自注意力(self‑attention)結構,成為當前自然語言處理的主流架構。

解題方法
直接比對選項文字與正式全稱 “Generative Pre‑trained Transformer” 的關鍵詞。檢查每個選項是否包含「Generative」與「Transformer」兩個核心詞彙,且是否錯誤加入「Pre‑trained」或其他非官方詞彙。若選項皆未符合,則選擇 E. none of the above。

選項分析

選項文字內容是否符合正式全稱評析
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 24 題

Which of the following refers to an assessment to determine whether a machine can exhibit the same intelligence as a human?
(A) artificial general intelligence (AGI)
(B) Turing complete
(C) Chinese room argument
(D) Turing test
(E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考查人工智慧的基本概念,尤其是艾倫・圖靈提出的 圖靈測試(Turing test)。

圖靈測試是一種用來判斷機器是否具有人類般智能表現的評估方法。典型情境是:由人類評審透過文字與一名人類及一台機器互動,在不知道對方身分的情況下,判斷誰是人類。若評審無法穩定區分機器與人類,則可認為該機器在測試中展現出接近人類的智能行為。

本題關鍵在於辨識題幹中的「assessment to determine whether a machine can exhibit the same intelligence as a human」,也就是「評估機器是否能展現與人類相同的智能」。這正是圖靈測試所要探討的問題。

解題方法

判斷方式是將題幹描述與各人工智慧術語的定義逐一對照:

  1. 題幹詢問的是一種「評估方法」。
  2. 評估目標是判斷機器是否能表現出人類般的智能。
  3. 符合此定義的術語為 Turing test。

因此正確答案為圖靈測試。

選項分析

(A) artificial general intelligence(AGI)

AGI 指「人工通用智慧」,是指具備廣泛、通用認知能力的人工智慧系統,能在多種不同領域理解、學習、推理與解決問題,而非只專精於單一任務。

AGI 是一種人工智慧能力或系統目標,不是用來評估機器是否具有人類智能的測試方法,因此錯誤。

(B) Turing complete

Turing complete 指「圖靈完備」。若一個計算模型能夠模擬圖靈機,理論上便能計算所有可計算的函數,則稱其具備圖靈完備性。

這是計算理論中的能力描述,與程式語言或計算模型的表達能力有關,不是人工智慧評估方法,因此錯誤。

(C) Chinese room argument

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 25 題40 分

The following C++ code fragment shows the class definition of a pointer-based implementation of ADT Binary Search Tree that stores employee information of a company. Each tree node stands for an employee. The employeeID is the key and it cannot be duplicated!!

class TreeNode
{
public:
private:
int employeeID;
string emplyeeName;
int age;
TreeNode *leftChildPtr;
TreeNode *rightChildPtr;
friend class BinarySearchTree;
};

class BinarySearchTree
{
public:
int InsertNewEmployee (int newID, string newName, int newAge);
// return 1 if the insertion is successful; otherwise return 0
void ListAllEmployee();
// print all employee info in sorted order
protected:
void inorder (TreeNode *treePtr);
// a RECURSIVE inorder traversal that prints (ID, name, age) of all employees
private:
TreeNode *rootPtr; // pointer to the root of tree, NULL if the tree is empty
};

(a) (20 points) Write the BinarySearchTree::InsertNewEmployee() that inserts a new employee into the binary search
tree. Here, we assume the employee ID is never duplicated; and the ID is the key of a tree node.
(b) (20 points) Write the BinarySearchTree::ListAllEmployee() that prints all employee information in ascending order
in accordance with employeeID. Note that you also need to implement the protected function
BinarySearchTree::inorder() called by ListAllEmployee() that recursively traverses the tree for printing all
employee information.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考查:

  1. 二元搜尋樹(Binary Search Tree, BST)的插入。

  2. BST 的排序性質:

    • 左子樹所有節點的 employeeID 小於根節點。
    • 右子樹所有節點的 employeeID 大於根節點。
    • employeeID 不可重複。
  3. 中序走訪(inorder traversal):

    左子樹→根節點→右子樹 \text{左子樹} \rightarrow \text{根節點} \rightarrow \text{右子樹}

    對 BST 進行中序走訪,會依照 key 由小到大輸出所有節點。

題目中的 rootPtr 必須在建立樹物件時初始化為 NULL:

BinarySearchTree() : rootPtr(NULL) {}

(a)插入新員工

解題方法

插入流程如下:

  1. 建立新的 TreeNode,填入員工資料。
  2. 若樹為空,將新節點設為根節點。
  3. 若樹不為空,從根節點開始比較:
    • newID 較小,往左子樹走。
    • newID 較大,往右子樹走。
  4. 持續走訪直到找到空指標,再將新節點接到上一個節點下方。
  5. 若遇到相同的 employeeID,插入失敗並回傳 0。

參考程式碼

int BinarySearchTree::InsertNewEmployee(
    int newID,
    string newName,
    int newAge)
{
    TreeNode *newNode = new TreeNode;

    newNode->employeeID = newID;
    newNode->emplyeeName = newName;
    newNode->age = newAge;
    newNode->leftChildPtr = NULL;
    newNode->rightChildPtr = NULL;

    // 樹為空,新節點成為根節點
    if (rootPtr == NULL)
    {
        rootPtr = newNode;
        return 1;
    }

    TreeNode *currentPtr = rootPtr;
    TreeNode *parentPtr = NULL;

    // 尋找新節點應插入的位置
    while (currentPtr != NULL)
    {
        parentPtr = currentPtr;

        if (newID < currentPtr->employeeID)
        {
            currentPtr = currentPtr->leftChildPtr;
        }
        else if (newID > currentPtr->employeeID)
        {
            currentPtr = currentPtr->rightChildPtr;
        }
        else
        {
            // employeeID 重複,不允許插入
            delete newNode;
            return 0;
        }
    }

    // 將新節點接到正確的子樹
    if (newID < parentPtr->employeeID)
    {
        parentPtr->leftChildPtr = newNode;
    }
    else
    {
        parentPtr->rightChildPtr = newNode;
    }

    return 1;
}

時間與空間複雜度

設樹高為 hh:

  • 插入時間複雜度:O(h)O(h)
  • 額外空間複雜度:O(1)O(1)

若 BST 平衡,h≈log⁡nh \approx \log n,插入為 O(log⁡n)O(\log n);若樹退化成鏈結串列,h=nh=n,最差為 O(n)O(n)。

(b)依員工編號遞增輸出

解題方法

對 BST 使用中序遞迴:

  1. 遞迴走訪左子樹。
  2. 輸出目前節點資料。
  3. 遞迴走訪右子樹。

因為 BST 的左、中、右順序分別代表「較小、目前、較大」的 key,所以中序走訪結果會依 employeeID 遞增排列。

ListAllEmployee()

void BinarySearchTree::ListAllEmployee()
{
    inorder(rootPtr);
}

inorder()

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

其他考古題