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.
The 20 questions
-
What is string concatenation?
- Reversing string order
- Joining strings together
- Splitting string arrays
- Counting string length
-
What is the purpose of string slicing?
- Merging two strings
- Deleting string data
- Encrypting string input
- Extracting substrings
-
What is the correct sequence for basic file handling?
- Process, open, close
- Close, open, process
- Open, process, close
- Open, close, process
-
What best describes a standard programming array?
- Fixed-length same-type list
- Variable-length text file
- Dynamic multi-type list
- Unordered key-value store
-
In a 2D array emulating a database table, what do columns represent?
- Fields
- Records
- Queries
- Files
-
What is a programming record structure?
- Global constant list
- Single-type fixed array
- Mixed-type grouped fields
- Dynamic subroutine stack
-
Which SQL keyword specifies which columns to return?
- SELECT
- INSERT
- FROM
- WHERE
-
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
-
Which SQL keyword specifies the table being queried?
- FROM
- WHERE
- SELECT
- QUERY
-
Which programming method is used to convert an integer value into a string?
- len()
- int()
- float()
- str()
-
An array of five scores is indexed from 0. What is the last valid index?
- 6
- 4
- 5
- 1
-
What is the main benefit of using subprograms like procedures in programming?
- Smaller file size
- Faster compilation
- More secure code
- Code reuse
-
Which programming feature is best used to simulate a standard six-sided dice roll?
- Random integer
- File reading
- Random float
- String slicing
-
Which type of variable is only accessible inside the subprogram that declares it?
- Local variable
- Global variable
- Static array
- Constant value
-
Which programming method is used to read all lines from a text file until the end?
- Iteration
- Selection
- Concatenation
- Casting
-
Can arrays be passed as parameters and returned from subprograms?
- Only strings
- No
- Yes
- Only constants
-
A SQL query must return only records where age is greater than 17. Which clause filters the records?
- INSERT
- FROM
- SELECT
- WHERE
-
What is the main programming risk associated with using global variables?
- Unexpected changes
- Compile errors
- Local scope
- Fixed length
-
Why are arrays described as static data structures in programming?
- Read only
- Constant values
- Global scope
- Fixed length
-
Which file handling step must occur before any data can be read or written?
- Appending file
- Deleting file
- Closing file
- Opening file
Related quizzes
- Programming fundamentals Quiz · 2.2.1 · 20 questions
- Data types Quiz · 2.2.2 · 20 questions
- Architecture of the CPU Quiz · 1.1.1 · 20 questions
- Primary storage (memory) Quiz · 1.2.1 · 20 questions
- Networks and topologies Quiz · 1.3.1 · 20 questions
- Threats to computer systems and networks Quiz · 1.4.1 · 20 questions
- Operating systems Quiz · 1.5.1 · 20 questions
- Ethical, legal, cultural and environmental impact Quiz · 1.6.1 · 20 questions
- Computational thinking Quiz · 2.1.1 · 20 questions
- Defensive design Quiz · 2.3.1 · 20 questions