A computer program that translates a program statement by statement into…

2013

A computer program that translates a program statement by statement into machine language is called a/an

Answer: D. InterpreterConcept: A language translator is a system program that converts source code written by a programmer into machine language that the processor can execute.…

  1. A.

    Compiler

  2. B.

    Simulator

  3. C.

    Translator

  4. D.

    Interpreter

Attempted by 56 students.

Show answer & explanation

Correct answer: D

Concept: A language translator is a system program that converts source code written by a programmer into machine language that the processor can execute. Translators are distinguished by the unit of code they handle at one time and by what they leave behind: one kind translates the complete program before execution and stores a separate machine-code file, while another kind works on a single statement at a time and executes it immediately, storing no separate machine-code file.

Application: The stem fixes the unit of translation as "statement by statement" into machine language. The term whose defining behaviour is exactly that per-statement unit is the interpreter: it converts one source statement, executes it, and only then reads the next statement. The answer is therefore Interpreter.

Cross-check: how each offered term is defined:

  • Compiler — translates the entire source program before it is run, producing a separate object or executable file that is executed afterwards as a standalone unit.

  • Simulator — reproduces the behaviour of one system (a machine, a device, or an environment) on another platform, so that its operation can be observed or tested there.

  • Translator — the generic category name for any system program that converts code written in one language into an equivalent form in another language; it names the whole family of such tools rather than one member of it.

  • Interpreter — converts one source statement into machine language and executes it immediately, then moves on to the next statement, without producing a separate executable file.

Only the interpreter is defined by the per-statement unit that the stem describes, while "translator" names the family that contains it. The program that translates a program statement by statement into machine language is the interpreter.

Explore the full course: Btsc Lab Assistant

Loading lesson…