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

  • 1
    What is the function of a structure diagram?
    Respondre
    (C)
    To show the top-down design.
  • 2
    Which standard method is used to examine each element in a list?
    Respondre
    (D)
    Bubble Sort
  • 3
    What is the difference between a stack and a queue?
    Respondre
    (A)
    Stacks use LIFO (Last-In, First-Out) and queues use FIFO (First-In, First-Out).
  • 4
    What type of check is used to make sure data input matches a specific format (like a date)?
    Respondre
    (D)
    Format check
  • 5
    What type of test data is best suited for identifying boundary conditions?
    Respondre
    (D)
    Boundary data
  • 6
    What is the main advantage of using pseudocode?
    Respondre
    (C)
    It is easy to convert to actual code and focuses on the logic.
  • 7
    What does the pseudocode statement INPUT represent?
    Respondre
    (B)
    Data entry
  • 8
    Which programming concept involves simplifying complex tasks into manageable steps?
    Respondre
    (A)
    Abstraction
  • 9
    In the given pseudocode, what is the purpose of the line 'OUTPUT "Total"'?
    Respondre
    (C)
    To display the result to the user.
  • 10
    Which elements are used in a pseudocode assignment statement?
    Respondre
    (B)
    Left arrow (<-)
  • 11
    In a pseudocode algorithm, what does the keyword 'THEN' usually follow?
    Respondre
    (C)
    IF condition
  • 12
    What is the purpose of a 'comment' in programming code?
    Respondre
    (C)
    To provide explanations for the code to other programmers.
  • 13
    What is the primary function of the 'ELSE' statement when used with an 'IF' condition?
    Respondre
    (B)
    To specify the action to take if the 'IF' condition is false.
  • 14
    Which of the following data structures uses the principle of LIFO?
    Respondre
    (B)
    Stack
  • 15
    What are the primary steps involved in an algorithm?
    Respondre
    (A)
    Input, Process, Output
  • 16
    What are the characteristics of a good algorithm?
    Respondre
    A
    B
    C
  • 17
    What is a common characteristic of a 'stack' data structure?
    Respondre
    (B)
    Elements are added and removed from the same end (LIFO).
  • 18
    What is a 'presence check' used for?
    Respondre
    (C)
    To make sure data has been entered
  • 19
    What is the purpose of the 'Coding' phase in the program development life cycle?
    Respondre
    (B)
    To write the actual program instructions.
  • 20
    What is a benefit of data validation?
    Respondre
    (C)
    Improves data quality.
  • 21
    Which statement is correct regarding the order of elements in a queue?
    Respondre
    (B)
    Elements are added at one end and removed from the other end.
  • 22
    In the concert ticket example, what discount is offered if a customer buys 20 or more tickets?
    Respondre
    (D)
    20%
  • 23
    What would be the best data validation check to use for a date of birth field?
    Respondre
    A
    B
    D
  • 24
    What is 'top-down design' in the context of program development?
    Respondre
    (A)
    Breaking down a problem into smaller sub-problems.
  • 25
    Which of the following is NOT a key element of the program development life cycle as per the text?
    Respondre
    (D)
    Implementation
  • 26
    When is the most appropriate time to use comments when writing code or pseudocode?
    Respondre
    (B)
    To clarify the intention and purpose of a block of code, or when the purpose of some code is not obvious.
  • 27
    What is the primary purpose of a structure diagram in the context of algorithm design?
    Respondre
    (C)
    To visualize how the program will be structured as a combination of sub-problems.
  • 28
    What type of data structure follows the First-In, First-Out (FIFO) principle?
    Respondre
    (B)
    Queue
  • 29
    In the context of data validation, what does a 'length check' assess?
    Respondre
    (B)
    The number of characters entered in an input field.
  • 30
    Which statement is best for a scenario that needs different actions depending on the *value* of a variable?
    Respondre
    (D)
    CASE...OF...OTHERWISE
  • 31
    If a password needs to be at least 8 characters long, what type of check is appropriate?
    Respondre
    (C)
    Length Check
  • 32
    What are the key components of an alarm app?
    Respondre
    A
    B
    C
  • 33
    What is the typical use of a double entry for data input?
    Respondre
    (B)
    To avoid errors during data input.
  • 34
    In a flowchart, what shape is used to represent a process?
    Respondre
    (B)
    Rectangle
  • 35
    What does the term 'debugging' refer to in programming?
    Respondre
    (B)
    The process of finding and fixing errors in the code.
  • 36
    What does the CASE statement allow you to do in programming?
    Respondre
    (B)
    Perform different actions based on the value of a variable.
  • 37
    What does 'pseudocode' allow programmers to do?
    Respondre
    B
    C
  • 38
    Which of the following checks could be used on a password?
    Respondre
    A
    B
    C
  • 39
    Which flowchart symbol is used for input and output?
    Respondre
    (B)
    Parallelogram
  • 40
    What is the value of the variable 'Amount' after the assignment statement: Amount <- 100?
    Respondre
    (B)
    100
  • 41
    Which of the following is an example of an abnormal test data?
    Respondre
    (C)
    Score = -1
  • 42
    Which operator is used for division in pseudocode?
    Respondre
    (C)
    /
  • 43
    Which is the best description of an algorithm?
    Respondre
    (B)
    A set of rules or steps to follow for solving a specific problem.
  • 44
    What is the primary purpose of a check digit in a barcode?
    Respondre
    (C)
    To detect data entry errors
  • 45
    Which of the following are the key components of a computer system as described in the context of problem decomposition?
    Respondre
    A
    B
    C
  • 46
    Which of the following is NOT a standard method used when creating algorithms?
    Respondre
    (D)
    Object Oriented Programming
  • 47
    What does a 'presence check' primarily aim to validate?
    Respondre
    (B)
    That an input field has a value.
  • 48
    Which of the following are essential parts of a computer system?
    Respondre
    A
    B
    C
  • 49
    What type of diagrams can be used to depict the top-down design?
    Respondre
    (B)
    Structure Diagrams
  • 50
    What type of test data would you use to test the behaviour of a program when entering the maximum value for a field?
    Respondre
    (C)
    Boundary data