Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 4)

1
Which of the following best describes the purpose of an algorithm?
Answer
(B)
To provide a step-by-step set of instructions to solve a problem.
2
What is the purpose of the 'FOR...TO...NEXT' loop structure?
Answer
(B)
To repeat a block of code a specific number of times.
3
In pseudocode, which is commonly used to represent assignment?
Answer
(C)
<-
4
What is the purpose of a 'range check' in data validation?
Answer
(B)
To check if the input value is within a pre-defined acceptable range.
5
What is the role of an 'index' in an array used in a FOR loop?
Answer
(C)
To indicate the position of an item in the array.
6
Which of the following is an example of an array?
Answer
(B)
A data structure used to hold a collection of elements of the same data type.
7
In a linear search, what action is performed if the search term is not found in the list?
Answer
(C)
The algorithm outputs 'Not found'.
8
Which of the following is an example of a linear search?
Answer
(B)
Checking elements one by one, from the beginning.
9
What is an advantage of using subroutines?
Answer
A
B
D
10
Which of the following loop types is a 'post-condition' loop?
Answer
(C)
REPEAT...UNTIL
11
What shape is typically used in a flowchart to represent a decision or a condition?
Answer
(C)
Diamond
12
What is a 'variable' used for in a program?
Answer
(B)
To store data that can change.
13
What is the purpose of a queue in data structures?
Answer
(B)
To store data in a first-in, first-out (FIFO) manner.
14
Which type of check would be best to prevent a user from entering text in a field that should contain numbers?
Answer
(C)
Type Check
15
What type of check would verify a user's password is at least 8 characters long?
Answer
(C)
Length check
16
What are the basic parts of a system?
Answer
A
B
C
17
Which of the following loop structures is most appropriate for reading values into an array with a known length?
Answer
(C)
FOR ... TO ... NEXT
18
Which of the following structures would be best suited for adding items to a list and removing the oldest item on the list?
Answer
(B)
Queue
19
Which of the following is NOT a characteristic of a good algorithm?
Answer
(B)
Ambiguity
20
What is the purpose of data validation?
Answer
(B)
To ensure data quality and accuracy.
21
What is the primary goal of modularity in software design?
Answer
(B)
To break down the code into smaller, manageable, and reusable units.
22
Which of the following is NOT a valid data validation check?
Answer
(C)
Arithmetic check
23
What is a 'subroutine' or 'procedure' in programming?
Answer
(B)
A small, self-contained block of code that performs a specific task.
24
In an algorithm, what does a 'variable' represent?
Answer
(B)
A named storage location for data.
25
Which method can prevent the incorrect values in a double entry data?
Answer
(D)
The system compares the data entered by different operators
26
What is the purpose of the 'flag' variable in a linear search?
Answer
(B)
To indicate whether the search should continue or stop.
27
What is the first stage in the program development life cycle?
Answer
(C)
Analysis
28
What happens if the value entered does not pass the data validation check?
Answer
(C)
An error message is displayed, and the user is prompted to re-enter the data.
29
Which of the following is NOT a standard control structure?
Answer
(D)
Abstraction
30
What does the diamond-shaped symbol represent in a flowchart?
Answer
(B)
Decision
31
What does the 'ELSE' keyword indicate within the IF-THEN-ELSE-ENDIF structure?
Answer
(C)
The action to be taken if the condition is false
32
In the context of algorithm design, what does verification mainly concern?
Answer
(B)
Confirming data accuracy from one place to another.
33
Which type of loop is best suited for repeating a process until a specific condition is met?
Answer
(D)
REPEAT...UNTIL
34
If you wanted to validate an email address input field, which checks would be most appropriate?
Answer
B
D
35
What are the advantages of using a modular approach in algorithm design?
Answer
A
B
C
36
In a structure diagram, what is depicted?
Answer
(D)
The hierarchical organization of the system.
37
What does the decision flowchart symbol represent?
Answer
(C)
A condition
38
Which of the following checks can be applied to data?
Answer
A
B
C
39
What is the main advantage of using functions or subroutines in a program?
Answer
(C)
They improve code readability and reduce redundancy.
40
In the context of a WHILE loop, what determines when the loop will terminate?
Answer
(B)
When the condition in the loop becomes false.
41
What is the purpose of decomposition in problem-solving?
Answer
(B)
To simplify the problem by breaking it down into smaller, manageable parts.
42
What does the term 'pseudocode' refer to?
Answer
(C)
A simplified way of writing algorithms using plain language and structure.
43
What is the purpose of a flowchart in algorithm design?
Answer
(B)
To visually represent the steps of an algorithm.
44
In the context of algorithm design, what is meant by 'efficiency'?
Answer
(C)
The algorithm uses minimal resources (time, memory).
45
What is the main advantage of using a trace table in an algorithm?
Answer
(C)
It helps to identify errors by tracking variable values.
46
Which of the following statements is true about the IF-THEN-ELSE-ENDIF structure?
Answer
(B)
It is used to make decisions.
47
What is the benefit of breaking down a complex problem into smaller parts in the context of programming?
Answer
(B)
It makes the problem easier to solve and understand.
48
What is the role of an 'index' in an array?
Answer
(C)
To identify and access specific elements within the array.
49
What is an abstraction in computer science?
Answer
(A)
The process of hiding implementation details and exposing only essential information.
50
What is a 'pre-condition' loop?
Answer
(A)
A loop where the condition is checked before each iteration.