A Level Computer Science OCR Practice Exam

Question: 1 / 400

Which process does a compiler NOT handle?

Translating high-level code into object code

Line-by-line code execution

A compiler primarily focuses on translating high-level programming language code into machine code, which is referred to as object code. This process involves several key tasks, including building a symbol table that keeps track of variable names and their corresponding data types and locations during program execution. Additionally, the compiler performs syntax checks to ensure that the code complies with the language's grammar rules before generating machine code.

Line-by-line code execution is not a function of a compiler. Instead, this is the role of an interpreter, which executes code one instruction at a time, allowing for immediate feedback during the development process. In contrast, a compiler translates the entire source code in one go, producing an executable file that can be run independently. Therefore, the correct answer indicates that line-by-line code execution is outside the compiler's responsibilities, distinguishing the roles of compilers and interpreters in programming.

Get further explanation with Examzify DeepDiveBeta

Building a symbol table

Performing syntax checks

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy