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?
پاسخ دهید(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?
پاسخ دهید(B)
To repeat a block of code a specific number of times.
3
In pseudocode, which is commonly used to represent assignment?
4
What is the purpose of a 'range check' in data validation?
پاسخ دهید(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?
پاسخ دهید(C)
To indicate the position of an item in the array.
6
Which of the following is an example of an array?
پاسخ دهید(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?
پاسخ دهید(C)
The algorithm outputs 'Not found'.
8
Which of the following is an example of a linear search?
پاسخ دهید(B)
Checking elements one by one, from the beginning.
9
What is an advantage of using subroutines?
10
Which of the following loop types is a 'post-condition' loop?
11
What shape is typically used in a flowchart to represent a decision or a condition?
12
What is a 'variable' used for in a program?
پاسخ دهید(B)
To store data that can change.
13
What is the purpose of a queue in data structures?
پاسخ دهید(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?
15
What type of check would verify a user's password is at least 8 characters long?
16
What are the basic parts of a system?
17
Which of the following loop structures is most appropriate for reading values into an array with a known length?
18
Which of the following structures would be best suited for adding items to a list and removing the oldest item on the list?
19
Which of the following is NOT a characteristic of a good algorithm?
20
What is the purpose of data validation?
پاسخ دهید(B)
To ensure data quality and accuracy.
21
What is the primary goal of modularity in software design?
پاسخ دهید(B)
To break down the code into smaller, manageable, and reusable units.
22
Which of the following is NOT a valid data validation check?
23
What is a 'subroutine' or 'procedure' in programming?
پاسخ دهید(B)
A small, self-contained block of code that performs a specific task.
24
In an algorithm, what does a 'variable' represent?
پاسخ دهید(B)
A named storage location for data.
25
Which method can prevent the incorrect values in a double entry data?
پاسخ دهید(D)
The system compares the data entered by different operators
26
What is the purpose of the 'flag' variable in a linear search?
پاسخ دهید(B)
To indicate whether the search should continue or stop.
27
What is the first stage in the program development life cycle?
28
What happens if the value entered does not pass the data validation check?
پاسخ دهید(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?
30
What does the diamond-shaped symbol represent in a flowchart?
31
What does the 'ELSE' keyword indicate within the IF-THEN-ELSE-ENDIF structure?
پاسخ دهید(C)
The action to be taken if the condition is false
32
In the context of algorithm design, what does verification mainly concern?
پاسخ دهید(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?
34
If you wanted to validate an email address input field, which checks would be most appropriate?
35
What are the advantages of using a modular approach in algorithm design?
36
In a structure diagram, what is depicted?
پاسخ دهید(D)
The hierarchical organization of the system.
37
What does the decision flowchart symbol represent?
38
Which of the following checks can be applied to data?
39
What is the main advantage of using functions or subroutines in a program?
پاسخ دهید(C)
They improve code readability and reduce redundancy.
40
In the context of a WHILE loop, what determines when the loop will terminate?
پاسخ دهید(B)
When the condition in the loop becomes false.
41
What is the purpose of decomposition in problem-solving?
پاسخ دهید(B)
To simplify the problem by breaking it down into smaller, manageable parts.
42
What does the term 'pseudocode' refer to?
پاسخ دهید(C)
A simplified way of writing algorithms using plain language and structure.
43
What is the purpose of a flowchart in algorithm design?
پاسخ دهید(B)
To visually represent the steps of an algorithm.
44
In the context of algorithm design, what is meant by 'efficiency'?
پاسخ دهید(C)
The algorithm uses minimal resources (time, memory).
45
What is the main advantage of using a trace table in an algorithm?
پاسخ دهید(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?
پاسخ دهید(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?
پاسخ دهید(B)
It makes the problem easier to solve and understand.
48
What is the role of an 'index' in an array?
پاسخ دهید(C)
To identify and access specific elements within the array.
49
What is an abstraction in computer science?
پاسخ دهید(A)
The process of hiding implementation details and exposing only essential information.
50
What is a 'pre-condition' loop?
پاسخ دهید(A)
A loop where the condition is checked before each iteration.