Which translator executes source code line by line at runtime?

Prepare for the IT GACE Computer Science Test. Use flashcards and multiple choice questions with hints and explanations. Excel in your exam preparation!

Multiple Choice

Which translator executes source code line by line at runtime?

Explanation:
An interpreter reads the program’s source code and executes each statement as the program runs, processing one line at a time. This is why it can execute code directly without producing a separate executable first. In contrast, a compiler translates the entire program into machine code before execution begins, creating a standalone executable. An assembler converts assembly language into machine code, not running the original source line by line. A linker doesn’t translate at runtime; it combines object files into a single unit after compilation. So, executing source code line by line at runtime is a hallmark of an interpreter.

An interpreter reads the program’s source code and executes each statement as the program runs, processing one line at a time. This is why it can execute code directly without producing a separate executable first. In contrast, a compiler translates the entire program into machine code before execution begins, creating a standalone executable. An assembler converts assembly language into machine code, not running the original source line by line. A linker doesn’t translate at runtime; it combines object files into a single unit after compilation. So, executing source code line by line at runtime is a hallmark of an interpreter.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy