Lesson 1.2.2b
1.2.2b Translators, compilation stages, linkers and loaders Quiz: OCR Computer Science, Unit 2
20 questions
In partnership with Revision Ninja
Lesson 1.2.2b, Translators, compilation stages, linkers and loaders: 20 multiple choice questions for the OCR Computer Science (H446), Unit 2: Software and software development, 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 type of translator converts high-level source code into machine code line by line at runtime?
- Interpreter
- Compiler
- Linker
- Assembler
-
Which stage of compilation removes comments and whitespace from source code?
- Optimisation
- Code generation
- Syntax analysis
- Lexical analysis
-
What replaces keywords, constants, and identifiers during the lexical analysis stage?
- Tokens
- Symbol tables
- Op-codes
- Parse trees
-
Which compilation stage checks that code follows the grammatical rules of the programming language?
- Syntax analysis
- Code generation
- Optimisation
- Lexical analysis
-
What is the main purpose of the code optimisation stage during compilation?
- Remove source comments
- Improve execution efficiency
- Generate initial tokens
- Check syntax rules
-
Which tool combines multiple compiled object code files into a single executable file?
- Assembler
- Linker
- Interpreter
- Loader
-
What is the primary role of an operating system loader?
- Compile high-level code
- Translate source code
- Load executables into RAM
- Link external libraries
-
Which type of linker embeds library code directly into the executable file at compile time?
- Dynamic linker
- Lexical analyser
- Static linker
- Runtime loader
-
Where are identifier names, data types, and scope information stored during compilation?
- Symbol table
- Call stack
- System registry
- Parse tree
-
Which translator converts low-level assembly language directly into executable machine code?
- Interpreter
- Compiler
- Transpiler
- Assembler
-
What intermediate code is generated by compiling Java source code before execution on a virtual machine?
- Assembly code
- Bytecode
- Machine code
- Source code
-
An error message stating 'Mismatched brackets' is produced during which compilation stage?
- Lexical analysis
- Syntax analysis
- Optimisation
- Code generation
-
Where is a new variable identifier stored during lexical analysis?
- Symbol table
- Control stack
- Data dictionary
- Heap memory
-
Which compilation output contains machine instructions but still requires memory address resolution?
- Source code
- Bytecode file
- Object code
- Executable file
-
Which system utility converts relative memory addresses in an executable into absolute RAM addresses?
- Loader
- Assembler
- Linker
- Compiler
-
Which stage of compilation checks for semantic errors, such as type mismatch in variable assignments?
- Code generation
- Semantic analysis
- Lexical analysis
- Syntax analysis
-
What is a major advantage of using an interpreter instead of a compiler during software development?
- Source code protection
- Easier error debugging
- Optimised machine code
- Faster execution speed
-
Which compiler generates executable code intended to run on a different operating system or architecture?
- Just-in-time compiler
- Cross compiler
- Bytecode compiler
- Decompiler
-
Which stage of compilation translates the checked syntax tree into machine code or assembly language instructions?
- Code optimisation
- Semantic analysis
- Code generation
- Lexical analysis
-
What is a main advantage of using intermediate code like Java bytecode?
- Direct hardware control
- Faster compilation
- No virtual machine
- Platform independence
Related quizzes
- Operating systems and memory management Quiz · 1.2.1a · 20 questions
- Interrupts, scheduling, OS types, BIOS, device drivers and virtual machines Quiz · 1.2.1b · 20 questions
- Types of application, utilities and open vs closed source Quiz · 1.2.2a · 20 questions
- Software development lifecycles and methodologies Quiz · 1.2.3 · 20 questions
- Programming paradigms, procedural and object-oriented languages Quiz · 1.2.4a · 20 questions
- Assembly language, Little Man Computer and memory addressing modes Quiz · 1.2.4b · 20 questions
- Processor components: ALU, control unit, registers and buses Quiz · 1.1.1a · 20 questions
- Compression, encryption and hashing Quiz · 1.3.1 · 20 questions
- Primitive data types and binary number representation Quiz · 1.4.1a · 20 questions
- Data Protection Act 1998 and Computer Misuse Act 1990 Quiz · 1.5.1a · 20 questions