21
QuizMultiple Choice

Resources for Programmers — Unit test

Question 21 • Introduction to Information Technology - EL3701

How is an interpreter different from a compiler?

Answer
A
An interpreter translates and executes code line by line, while a compiler translates all code at once so that it is ready to be executed at any time.
B
An interpreter translates all code at once so that it is ready to be executed at any time, while a compiler translates and executes code line by line.
C
An interpreter translates programming code into binary language, while a compiler does not.
D
An interpreter translates binary language into programming language, while a compiler translates programming language into binary language.

Explanation

An interpreter translates and runs a program as it processes the code, often one statement at a time. A compiler translates the program into a form that can be executed later, typically translating the program before it runs. Therefore, choice A correctly describes the difference.

AI-written and checked against the verified answer.

Previous
Next