CAIE 9701 PAPER 3 2024 COMPLETE QUESTIONS AND
ANSWERS WITH VERIFIED SOLUTION
1. In a relational database, which SQL statement is used to retrieve data
from a table?
A. SELECT
B. INSERT
C. DELETE
D. UPDATE
Answer: A) SELECT
Rationale: The SELECT statement is used in SQL to retrieve data from
a database table.
2. What is the main advantage of a hash table over an array?
A. Faster access time
B. Better memory utilization
C. More efficient sorting algorithms
D. No need for data indexing
Answer: A) Faster access time
Rationale: A hash table provides constant-time O(1) access to elements
on average, whereas an array requires O(n) for searching in the worst
case.
3. What does the term 'polymorphism' in object-oriented programming
refer to?
A. The ability of a class to inherit properties from another class
B. The ability to define multiple constructors in a class
C. The ability to use a method or operator in different ways
D. The ability to create objects of multiple classes
Answer: C) The ability to use a method or operator in different ways
Rationale: Polymorphism allows a method or function to behave
,differently based on the object it is applied to, enabling one interface to
be used for different data types.
4. In a relational database, what does the term 'foreign key' refer to?
A. A column that is unique within the database
B. A column that links two tables together
C. A column that can have multiple NULL values
D. A column that stores large text data
Answer: B) A column that links two tables together
Rationale: A foreign key is a column in one table that refers to the
primary key in another table, establishing a relationship between them.
5. Which of the following is the primary purpose of an algorithm?
A. To solve problems
B. To write a computer program
C. To design a user interface
D. To debug errors in code
Answer: A) To solve problems
Rationale: An algorithm is a step-by-step procedure for solving a
problem or accomplishing a task. It is not just about writing programs
or designing UIs.
6. Which sorting algorithm is known for having the best average time
complexity?
A. Quick Sort
B. Bubble Sort
C. Merge Sort
D. Insertion Sort
Answer: A) Quick Sort
Rationale: Quick Sort is typically faster than other algorithms like
Merge Sort and Bubble Sort due to its O(n log n) average time
, complexity.
7. Which of the following is an example of a primary key in a database?
A. A column that can have duplicate values
B. A column that uniquely identifies each row in a table
C. A column that stores timestamps
D. A column that stores addresses
Answer: B) A column that uniquely identifies each row in a table
Rationale: A primary key is a column or a set of columns in a database
table that uniquely identifies each row.
8. Which of the following operations is the most time-efficient in a
balanced binary search tree (BST)?
A. Search
B. Insert
C. Delete
D. All of the above have the same time complexity
Answer: D) All of the above have the same time complexity
Rationale: In a balanced BST, search, insert, and delete all have a time
complexity of O(log n), where n is the number of elements in the tree.
9. What is the primary advantage of using a graph to represent a
network of connections?
A. It provides efficient searching and sorting of data.
B. It allows for easy representation of relationships between entities,
such as in social networks or web page links.
C. It guarantees the shortest path between any two nodes.
D. It can store a large amount of data efficiently in memory.
Answer: B) It allows for easy representation of relationships between
entities, such as in social networks or web page links.
Rationale: Graphs are ideal for representing complex relationships
ANSWERS WITH VERIFIED SOLUTION
1. In a relational database, which SQL statement is used to retrieve data
from a table?
A. SELECT
B. INSERT
C. DELETE
D. UPDATE
Answer: A) SELECT
Rationale: The SELECT statement is used in SQL to retrieve data from
a database table.
2. What is the main advantage of a hash table over an array?
A. Faster access time
B. Better memory utilization
C. More efficient sorting algorithms
D. No need for data indexing
Answer: A) Faster access time
Rationale: A hash table provides constant-time O(1) access to elements
on average, whereas an array requires O(n) for searching in the worst
case.
3. What does the term 'polymorphism' in object-oriented programming
refer to?
A. The ability of a class to inherit properties from another class
B. The ability to define multiple constructors in a class
C. The ability to use a method or operator in different ways
D. The ability to create objects of multiple classes
Answer: C) The ability to use a method or operator in different ways
Rationale: Polymorphism allows a method or function to behave
,differently based on the object it is applied to, enabling one interface to
be used for different data types.
4. In a relational database, what does the term 'foreign key' refer to?
A. A column that is unique within the database
B. A column that links two tables together
C. A column that can have multiple NULL values
D. A column that stores large text data
Answer: B) A column that links two tables together
Rationale: A foreign key is a column in one table that refers to the
primary key in another table, establishing a relationship between them.
5. Which of the following is the primary purpose of an algorithm?
A. To solve problems
B. To write a computer program
C. To design a user interface
D. To debug errors in code
Answer: A) To solve problems
Rationale: An algorithm is a step-by-step procedure for solving a
problem or accomplishing a task. It is not just about writing programs
or designing UIs.
6. Which sorting algorithm is known for having the best average time
complexity?
A. Quick Sort
B. Bubble Sort
C. Merge Sort
D. Insertion Sort
Answer: A) Quick Sort
Rationale: Quick Sort is typically faster than other algorithms like
Merge Sort and Bubble Sort due to its O(n log n) average time
, complexity.
7. Which of the following is an example of a primary key in a database?
A. A column that can have duplicate values
B. A column that uniquely identifies each row in a table
C. A column that stores timestamps
D. A column that stores addresses
Answer: B) A column that uniquely identifies each row in a table
Rationale: A primary key is a column or a set of columns in a database
table that uniquely identifies each row.
8. Which of the following operations is the most time-efficient in a
balanced binary search tree (BST)?
A. Search
B. Insert
C. Delete
D. All of the above have the same time complexity
Answer: D) All of the above have the same time complexity
Rationale: In a balanced BST, search, insert, and delete all have a time
complexity of O(log n), where n is the number of elements in the tree.
9. What is the primary advantage of using a graph to represent a
network of connections?
A. It provides efficient searching and sorting of data.
B. It allows for easy representation of relationships between entities,
such as in social networks or web page links.
C. It guarantees the shortest path between any two nodes.
D. It can store a large amount of data efficiently in memory.
Answer: B) It allows for easy representation of relationships between
entities, such as in social networks or web page links.
Rationale: Graphs are ideal for representing complex relationships