Computer Science for IGCSE & O level - Programming (Section 7)
1
What is the key objective of program debugging?
2
In the programming, which keyword can you use to specify the variable type?
3
What does an algorithm represent in the context of programming?
Відповідь(B)
A series of steps to solve a problem.
4
What is string concatenation?
Відповідь(C)
Combining two or more strings.
5
Which type of loop is represented by `WHILE...DO`?
6
What does the code "DECLARE SecondNum : REAL" indicate?
Відповідь(B)
The variable SecondNum is declared as a real number.
7
Which of the following is NOT a type of loop discussed in the text?
8
What is the main goal of code debugging?
Відповідь(C)
To find and fix errors (bugs) in the code.
9
If `NumberSubjects = 5` and a loop is designed to iterate through each subject, how many times will the loop run?
10
In programming, what is a 'loop' primarily used for?
Відповідь(B)
Repeating a block of code multiple times.
11
What programming construct facilitates the repeated execution of a block of code?
12
What type of data would be best used for a ClassName variable?
13
Which concept is used to repeat the steps of a program?
14
What defines the scope of a variable?
Відповідь(C)
Where the variable can be accessed.
15
What is the result of `print(10 > 5 and 2 < 1)`?
16
Which of the following is typically used to store multiple values of the same type?
17
What is the result of the following code segment: `x = 10; y = 3; z = x // y;`?
18
What does the acronym 'IDE' stand for?
Відповідь(A)
Integrated Development Environment
19
When dealing with a two-dimensional array, what would be required in the declaration or initialization?
Відповідь(B)
A row index and a column index
20
What is the benefit of modular programming?
Відповідь(C)
It makes it easier to understand, test, and maintain code.
21
Which of the following is used for comments?
22
What does the term 'algorithm' generally refer to in computer science?
Відповідь(B)
A step-by-step procedure to solve a problem.
23
Which of the following best defines the concept of scope in programming?
Відповідь(C)
The portion of the code where a variable is accessible.
24
Which of the following best describes the role of a FOR loop in array manipulation?
Відповідь(C)
To populate or iterate through the array.
25
How are elements in an array typically accessed?
Відповідь(B)
By their index or position.
26
What is the `ELSE` statement typically used for in combination with an `IF` statement?
Відповідь(C)
To execute a block of code when the `IF` condition is false.
27
What is the keyword used within a function to return a value in the provided examples?
28
What is the appropriate method to read a file in most modern languages?
29
What is the primary purpose of the provided pseudo-code snippet's 'FOR' loop in the context of calculating student marks?
Відповідь(B)
To iterate through each student in a class.
30
What is a key advantage of using constants in programming?
Відповідь(C)
Constants make the code more readable and maintainable.
31
What is the output of `print(str(123) + "456")`?
32
Why is it important to use well-named identifiers?
Відповідь(C)
To improve the code's readability.
33
Which of these concepts is NOT part of the basic program concepts?
34
What is the output of "Hello".Substring(2, 2)?
35
Which of the following best describes a "constant" in programming?
Відповідь(B)
A value that does not change during program execution.
36
Which function can perform the 'Hello World' output in Java?
37
Which of the following statements describes the main characteristic of a function in programming?
Відповідь(B)
A function must always return a value.
38
Which characteristic distinguishes a function from a procedure?
Відповідь(B)
Functions always return a value.
39
What does the term 'algorithm' primarily refer to?
Відповідь(A)
A set of instructions for completing a task.
40
What is the purpose of writing and testing programs?
Відповідь(C)
To find and fix any errors (bugs) in the code.
41
What does the term 'iteration' mean in programming?
Відповідь(B)
Repeating a block of code.
42
Which of these best describes a parameter in the context of procedures and functions?
Відповідь(C)
A variable that stores the values of the arguments passed to a procedure or function.
43
Which of the following is a purpose of the 'input' operation in a program?
Відповідь(B)
To receive data from the user.
44
In pseudo-code what is an array?
Відповідь(B)
A structured form of data type
45
What does an output statement do in a programming language?
Відповідь(C)
Displays results to the user.
46
What is the purpose of the modulus operator (%)?
Відповідь(B)
To find the remainder of a division.
47
What does the term 'Iteration' mean?
Відповідь(A)
The action of repeating a set of statements
48
What is the role of an algorithm in the context of computer programming?
Відповідь(C)
To solve a specific problem through a series of steps.
49
What do parameters do in a function or procedure?
Відповідь(B)
They provide a way to pass data into the function or procedure.
50
What is the keyword used in Java to declare the variables?