+1 vote
by (524 points)
Characteristics of compiler and interpreter.

2 Answers

0 votes
by (876 points)
selected by
 
Best answer

Interpreter translates one statement at a time while a compiler scans the whole program and translates it into a machine code. An interpreter is memory efficient as they do not generate intermediate object code. But compilers do it.

0 votes
by (1.1k points)

Interpreter: 

Translates program one statement at a time.

Interpreters usually take less amount of time to analyze the source code. However, the overall execution time is comparatively slower than compilers.

No intermediate object code is generated, hence are memory efficient.

Compiler:

Scans the entire program and translates it as a whole into machine code.

Compilers usually take a large amount of time to analyze the source code. However, the overall execution time is comparatively faster than interpreters.

Generates intermediate object code which further requires linking, hence requires more memory.

...