59.0k views
5 votes
How is an interpreter different from a compiler?

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.
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.
An interpreter translates programming code into binary language, while a compiler does not.
An interpreter translates binary language into programming language, while a compiler translates programming language into binary language.

2 Answers

1 vote

Answer:

a

Step-by-step explanation:

taking test right now

User Ody
by
5.0k points
6 votes

Answer:

An interpreter is quite different from a complier due to the following statement below:

O. 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.

Step-by-step explanation:

For an interpreter, it works in translating and execution of the codes line after another line. In a situation where there is a mistake in the code, the next line would not be able to be executed, but rather display error message. On the other hand, compiler translate all codes at once and execute them as a single work.

During its translation of the codes in compiler, should there be any error, it would not be able to execute despite the fact that, the error might be in the last line of the code.

User RoundPi
by
5.1k points