Download Download
EXAMS
Ultimate 2025/2026 Exam Prep to Ace Your Exams and Avoid Resits |
Questions & Answers (Verified Answers) With Rationales (
Update)
This Document Contains:
58 Questions with Correct, Detailed and Verified Answers
2026/2027 Actual Exam Testbank
Questions & Answers (Verified Answers) With Rationales
100% Guaranteed Pass
Complete A+ Guide
Page 1
,Question 1
A programmer implements a binary search tree (BST) and notices that the time complexity of
searching for an element degrades to O(n) in the worst case. Which of the following scenarios
would cause this degradation?
A) The tree is balanced using rotations after each insertion.
B) The tree is built by inserting elements in sorted order.
C) The tree uses a hash function to distribute keys.
D) The tree is implemented using an array rather than linked nodes.
Answer: B) The tree is built by inserting elements in sorted order.
Explanation: Inserting elements in sorted order into a BST without self-balancing results in a skewed
tree, effectively a linked list, leading to O(n) search time. Option A would maintain
O(log n). Option C describes a hash table, not a BST. Option D is an implementation
detail that does not inherently cause degradation.
Question 2
In the context of the AQA AS Level Computer Science specification, which of the following best
describes the purpose of the 'fetch-execute cycle'?
A) It decodes high-level language instructions into machine code.
B) It manages the allocation of memory to processes.
C) It retrieves an instruction from memory, decodes it, and executes it.
D) It handles interrupts by saving the current state and loading an interrupt handler.
Answer: C) It retrieves an instruction from memory, decodes it, and executes it.
Explanation: The fetch-execute cycle is the fundamental operation of a CPU: fetching an instruction
from memory, decoding it, and executing it. Option A describes compilation or
interpretation, not the cycle. Option B is memory management. Option D is interrupt
handling, which is a separate mechanism.
Question 3
A developer writes a recursive function to compute the nth Fibonacci number. For n=50, the
function takes an extremely long time to execute. Which of the following is the most likely reason?
A) The function uses tail recursion, which causes stack overflow.
B) The function has exponential time complexity due to repeated calculations.
C) The function is not optimized for the CPU's pipeline.
D) The function uses global variables, causing synchronization overhead.
Answer: B) The function has exponential time complexity due to repeated calculations.
Explanation: A naive recursive Fibonacci function recomputes the same values many times, leading
to O(2^n) time complexity, which is infeasible for n=50. Tail recursion (A) would
actually be more efficient if properly implemented. Pipeline optimization (C) is a minor
factor. Global variables (D) are not inherently slow.
Page 2
, Question 4
Which of the following statements about the relational database model is correct?
A) A relation can contain duplicate tuples.
B) Foreign keys must have the same name as the primary key they reference.
C) A primary key can be composed of multiple attributes.
D) Null values are allowed in primary key attributes.
Answer: C) A primary key can be composed of multiple attributes.
Explanation: A composite primary key consists of multiple attributes. Option A is false; relations are
sets, so duplicates are not allowed. Option B is false; foreign key names can differ.
Option D is false; primary keys must be unique and not null.
Question 5
In the context of network protocols, which of the following best describes the role of the transport
layer in the TCP/IP model?
A) It provides end-to-end communication and error recovery.
B) It routes packets across different networks.
C) It defines the physical transmission of bits.
D) It formats data for presentation to the application.
Answer: A) It provides end-to-end communication and error recovery.
Explanation: The transport layer (e.g., TCP) ensures reliable end-to-end communication, including
error recovery and flow control. Option B describes the network layer (IP). Option C is
the physical layer. Option D is the presentation layer in the OSI model, not TCP/IP.
Page 3