A Level Computer Science OCR Test 2025 – 400 Free Practice Questions to Pass the Exam

Question: 1 / 400

Which characteristic applies to an interpreter?

It compiles code into an executable file

It translates high-level language into machine code line-by-line

The characteristic that applies to an interpreter is that it translates high-level language into machine code line-by-line. This means that an interpreter reads and executes the code one instruction at a time, translating it directly into machine code that the computer can execute immediately. This approach allows for immediate feedback and error detection, as any issues in the code can be identified as they occur during execution rather than at the end of a compilation process.

Compiling code into an executable file is a process associated with compilers rather than interpreters. Compilers translate the entire source code into machine code before execution, creating a separate executable file that can be run independently.

Requiring pre-compilation of all code is also a characteristic of compilers, not interpreters. Interpreters do not need to compile the entire program before execution; they process each line as it is encountered.

Generating a symbol table for the entire program is typically part of the compilation process. A symbol table is used to keep track of variables and their attributes, and while interpreters may use symbol tables, they do not necessarily generate one for the entire program as part of their execution method, since they can operate without compiling the entire program at once.

Therefore, the correct option highlights the interpreter's key function of

Get further explanation with Examzify DeepDiveBeta

It requires pre-compilation of all code

It generates a symbol table for the entire program

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy