Lesson 2.2.3

2.2.3 Additional programming techniques Quiz: OCR Computer Science, Unit 8

20 questions

In partnership with Revision Ninja

Lesson 2.2.3, Additional programming techniques: 20 multiple choice questions for the OCR GCSE Computer Science (J277), Unit 8: Programming fundamentals, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. What is string concatenation?

    • Reversing string order
    • Joining strings together
    • Splitting string arrays
    • Counting string length
  2. What is the purpose of string slicing?

    • Merging two strings
    • Deleting string data
    • Encrypting string input
    • Extracting substrings
  3. What is the correct sequence for basic file handling?

    • Process, open, close
    • Close, open, process
    • Open, process, close
    • Open, close, process
  4. What best describes a standard programming array?

    • Fixed-length same-type list
    • Variable-length text file
    • Dynamic multi-type list
    • Unordered key-value store
  5. In a 2D array emulating a database table, what do columns represent?

    • Fields
    • Records
    • Queries
    • Files
  6. What is a programming record structure?

    • Global constant list
    • Single-type fixed array
    • Mixed-type grouped fields
    • Dynamic subroutine stack
  7. Which SQL keyword specifies which columns to return?

    • SELECT
    • INSERT
    • FROM
    • WHERE
  8. What is the key functional difference between a function and a procedure?

    • Procedures cannot be called
    • Functions return values
    • Functions are local only
    • Procedures take no arguments
  9. Which SQL keyword specifies the table being queried?

    • FROM
    • WHERE
    • SELECT
    • QUERY
  10. Which programming method is used to convert an integer value into a string?

    • len()
    • int()
    • float()
    • str()
  11. An array of five scores is indexed from 0. What is the last valid index?

    • 6
    • 4
    • 5
    • 1
  12. What is the main benefit of using subprograms like procedures in programming?

    • Smaller file size
    • Faster compilation
    • More secure code
    • Code reuse
  13. Which programming feature is best used to simulate a standard six-sided dice roll?

    • Random integer
    • File reading
    • Random float
    • String slicing
  14. Which type of variable is only accessible inside the subprogram that declares it?

    • Local variable
    • Global variable
    • Static array
    • Constant value
  15. Which programming method is used to read all lines from a text file until the end?

    • Iteration
    • Selection
    • Concatenation
    • Casting
  16. Can arrays be passed as parameters and returned from subprograms?

    • Only strings
    • No
    • Yes
    • Only constants
  17. A SQL query must return only records where age is greater than 17. Which clause filters the records?

    • INSERT
    • FROM
    • SELECT
    • WHERE
  18. What is the main programming risk associated with using global variables?

    • Unexpected changes
    • Compile errors
    • Local scope
    • Fixed length
  19. Why are arrays described as static data structures in programming?

    • Read only
    • Constant values
    • Global scope
    • Fixed length
  20. Which file handling step must occur before any data can be read or written?

    • Appending file
    • Deleting file
    • Closing file
    • Opening file

All OCR Computer Science quizzes