KnowledgeBoat Logo
|

Computer Science

How is an interpreter different from compiler on these parameters?

(a) Memory requirement during translation

(b) Memory requirement after translation

(c) Number of instructions translated

Computer System

2 Likes

Answer

(a) Memory requirement during translation — Interpreter requires less memory during translation, as it translates and executes code line by line. Compiler requires more memory during translation, as it translates the entire program at once before execution.

(b) Memory requirement after translation — Interpreter continues to require memory after translation, as it needs to re-translate every time the program is run. Compiler requires less memory after translation, as it produces an executable file that can be run independently.

(c) Number of instructions translated — Interpreter translates and executes one instruction at a time. Compiler translates the entire set of instructions at once, producing a complete machine code program.

Answered By

1 Like


Related Questions