Correct option is C
An
interpreter is a program that
converts a program into machine code line by line as the program is run. It reads and executes the code one line at a time, translating each line into machine code and executing it immediately. This allows for interactive execution, making it useful in scripting and debugging.
Important Key Points:
1.
Line-by-Line Execution: Unlike a compiler, which translates the entire program into machine code before execution, an interpreter processes the program one line at a time.
2.
Immediate Execution: The interpreter executes the code as it translates it, so there is no separate executable file created.
3.
Popular Languages: Interpreters are commonly used in languages like Python, JavaScript, and Ruby.
Knowledge Booster:
·
Option (a): This is incorrect because an
interpreter does not convert machine language to a high-level language; it works in the opposite direction—translating high-level language into machine code.
·
Option (b): This is a description of a
compiler, not an interpreter. A compiler translates the entire program into machine code in one step before execution.
·
Option (d): This is incorrect because a program that "writes instructions to perform" refers to a program that generates machine code, but not specifically an interpreter.