CBSE Class 11 Computer Science Question 63 of 107

Computer System Overview — Question 5

Back to all questions
5
Question

Question 5

Differentiate between a compiler and interpreter.

Answer
CompilerInterpreter
A compiler converts an high level language program in machine language in one go.An interpreter converts an high level language program into machine language line by line and simultaneously executes the converted line.
If there are errors in the program, it gives the error list along with the line numbers.If an error occurs in a line, the line is displayed and interpreter does not proceed unless the error is rectified.
Once the errors are removed, error-free object code is made available and after this compiler is no more needed in the memory.An interpreter must always be present in the memory along with the program for its execution.