Computer Science for IGCSE & O level - Programming (Section 7)

  • 1
    What is the key objective of program debugging?
    תְשׁוּבָה
    (B)
    To find and fix errors.
  • 2
    In the programming, which keyword can you use to specify the variable type?
    תְשׁוּבָה
    (C)
    All the above
  • 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`?
    תְשׁוּבָה
    (B)
    Pre-condition loop.
  • 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?
    תְשׁוּבָה
    (D)
    Selection loop
  • 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?
    תְשׁוּבָה
    (B)
    5
  • 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?
    תְשׁוּבָה
    (C)
    Loop
  • 12
    What type of data would be best used for a ClassName variable?
    תְשׁוּבָה
    (D)
    STRING
  • 13
    Which concept is used to repeat the steps of a program?
    תְשׁוּבָה
    (C)
    Iteration
  • 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)`?
    תְשׁוּבָה
    (B)
    False
  • 16
    Which of the following is typically used to store multiple values of the same type?
    תְשׁוּבָה
    (C)
    Array
  • 17
    What is the result of the following code segment: `x = 10; y = 3; z = x // y;`?
    תְשׁוּבָה
    (A)
    3
  • 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?
    תְשׁוּבָה
    (D)
    All of the above
  • 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?
    תְשׁוּבָה
    (B)
    RETURN
  • 28
    What is the appropriate method to read a file in most modern languages?
    תְשׁוּבָה
    (A)
    read
  • 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")`?
    תְשׁוּבָה
    (B)
    123456
  • 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?
    תְשׁוּבָה
    (D)
    loops
  • 34
    What is the output of "Hello".Substring(2, 2)?
    תְשׁוּבָה
    (B)
    ll
  • 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?
    תְשׁוּבָה
    (A)
    System.out.println()
  • 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?
    תְשׁוּבָה
    (D)
    None of the above