CBSE Class 11 Computer Science Question 67 of 106

Computer System Organization — Question 28

Back to all questions
28
Question

Question 28

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

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.