What type of translator turns source code into machine code line by line?

Study for the OCR GCSE Computer Science Exam. Prepare with flashcards, multiple choice questions, and hints. Get exam-ready with practical questions and answers!

An interpreter is a type of translator that processes source code by translating it into machine code line by line. This means that as the interpreter reads the source code, it executes each command immediately without converting the entire program into machine code at once. This approach allows for easier debugging and immediate feedback for developers, as they can see how each line behaves as it is executed.

In contrast, a compiler translates the entire source code into machine code before any execution occurs, generating an executable file that can be run later. An assembler is used specifically to convert assembly language, which is a low-level language closer to machine code, into machine code. A linker is more about combining various pieces of code and libraries into a single executable, rather than translating source code to machine code. Therefore, the characteristic of line-by-line execution makes the interpreter the correct choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy