Prepare for the A Level Computer Science OCR Exam with engaging quizzes, detailed explanations, and effective study tips. Maximize your readiness and boost your confidence for exam day!

Practice this question and more.


Which process does a compiler NOT handle?

  1. Translating high-level code into object code

  2. Line-by-line code execution

  3. Building a symbol table

  4. Performing syntax checks

The correct answer is: 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.