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

1
What is the primary function of a 'bubble sort' algorithm?
Answer
(C)
Sorting a list of items
2
Which standard method would be used to find the number of students who scored above 80 on a test?
Answer
(B)
Counting
3
What type of data is used to test the extreme limits of a range of acceptable values?
Answer
(C)
Extreme data
4
What are the benefits of using a flowchart to represent an algorithm?
Answer
A
B
C
5
What is the purpose of a screen/visual check?
Answer
(C)
To have the user confirm entered data against a source document
6
Which keywords are generally used for conditional statements?
Answer
A
B
C
7
Which of the following is used to repeat statements?
Answer
(C)
Loop Structure
8
Which flowchart symbol would you use to represent a decision in your algorithm?
Answer
(B)
A diamond
9
What is a key characteristic of a 'linear search' algorithm?
Answer
(C)
It examines items in a sequential order.
10
Which data validation check is useful to ensure a date is within a valid range?
Answer
(D)
Range Check
11
What is the function of a 'type check' in the context of data validation?
Answer
(C)
To confirm data is of the correct data type.
12
Which of the following data validation methods is suitable for an algorithm that validates a user's age?
Answer
A
C
D
13
In the context of algorithm design, what does the term 'iteration' primarily refer to?
Answer
(B)
Repeating a set of actions
14
In the context of a programming algorithm, what is 'totaling' used for?
Answer
(B)
Calculating the sum of a set of numbers.
15
What are the key features of a good algorithm?
Answer
A
B
C
D
16
What is the definition of a 'variable' in programming?
Answer
(B)
A storage location with a name that can hold a value that may change during the program.
17
In the program development life cycle, what is the purpose of the 'Maintenance' phase?
Answer
(B)
To update and improve the program after its release.
18
Which of the following is an example of a selection control structure?
Answer
(C)
IF...THEN...ELSE
19
What type of data is stored in a 'stack' data structure?
Answer
(B)
Last-In, First-Out (LIFO)
20
What does the term 'algorithm' primarily describe?
Answer
(B)
A set of instructions to solve a problem.
21
What is a key advantage of using a top-down design approach?
Answer
(B)
It simplifies complex problems by breaking them down.
22
What is the purpose of the 'FOR' loop in a programming context?
Answer
(B)
To repeat a block of code a fixed number of times.
23
What is the primary function of an algorithm?
Answer
(C)
To provide a step-by-step solution to a problem.
24
What is the purpose of pseudocode?
Answer
(A)
To provide a way to show algorithm
25
What type of data structure is best suited for implementing a 'undo' functionality?
Answer
(B)
Stack
26
What is a stack?
Answer
B
C
D
27
What is the purpose of testing a program?
Answer
A
C
28
What is a 'syntax error' in programming?
Answer
(B)
An error in the grammar or structure of the code.
29
What is the goal of using "normal data" in testing an algorithm?
Answer
(B)
To test the algorithm with valid and expected inputs.
30
What is a key characteristic of an algorithm?
Answer
(C)
It must be executable.
31
In pseudocode, how are keywords typically written?
Answer
(B)
In capital letters
32
What is the purpose of a 'FOR' loop in an algorithm?
Answer
(A)
To perform a set of instructions repeatedly for a specific number of times.
33
What is the main goal of the 'Analysis' phase in the program development life cycle?
Answer
(B)
To determine what is required from the program.
34
Which of the following is a suitable method for validating a numerical value entered by a user?
Answer
(D)
Type check
35
Which of these is NOT a reason to use an algorithm?
Answer
(C)
To execute a program.
36
In the pseudocode, what does 'FOR Counter = 1 TO 20' represent?
Answer
(A)
A loop that executes 20 times.
37
Which data structure follows the Last-In, First-Out (LIFO) principle?
Answer
(B)
Stack
38
What does the term 'verification' mean in the context of data?
Answer
(C)
Checking data against the original source to ensure accuracy.
39
What should be used to ensure a numerical value is within a specific range?
Answer
(C)
Range check
40
Which validation check would be appropriate for checking if a text field has any text entered?
Answer
(C)
Presence check
41
What is an example of a control structure used in programming?
Answer
A
B
C
42
What is the function of 'Storage' in a computer system component?
Answer
(C)
To store data for future use
43
When would you use the FOR...TO...NEXT loop?
Answer
(B)
When you need to repeat an action a set number of times.
44
What is the difference between a pre-condition and post-condition loop?
Answer
(A)
Pre-condition loops check the condition first, post-condition loops check at the end.
45
What is the correct term to describe the process of breaking down a complex problem into smaller, more manageable sub-problems?
Answer
(B)
Decomposition
46
In the context of conditional statements, what do the keywords IF, THEN, ELSE, and ENDIF signify?
Answer
(C)
Decision-making based on conditions
47
What does 'IF...THEN...ELSE' represent in pseudocode?
Answer
(B)
A selection structure.
48
Which type of error is caused by incorrect logic in the algorithm?
Answer
(C)
Logic error
49
What is the purpose of a 'range check' in data validation?
Answer
(A)
To ensure data is within a certain set of values.
50
What type of error is caused by a missing semicolon in a programming language like Python?
Answer
(B)
Syntax Error