Difference between Compiler and Interpreter.

Leave a Comment

Interpreter
Compiler
The source program gets interpreted every time it is to be executed and every time the source program is analyzed. Hence interpretation is less efficient than Compiler.

In the process of compilation the program is analyzed only once and then the code is generated. Hence compiler is efficient then interpreter.

The interpreters do not produce object code.

The compilers produce object code.

The interpreters can be made portal because they do not produce object code.

The compilers has to be present on the host machine when particular program needs to be compiled.

Interpreters are simpler and give us improved debugging environment.

The compiler is a complex program and it requires large amount of memory.

An interpreter is a kind on translator which produces the results directly when the source language and data is given to it as input.

Example of interpreter :
A UPS Debugger is basically a graphical source level debugger but it contains built in C interpreter which can handle multiple source files.
 
An compiler is a kind of translator which takes only source program as input and converts it into object code.


Then loader performs loading and link editing and prepares an executable code. Compiler takes this executable code and data as input and produces output.


Example of Compiler :
Borland C compiler or Turbo C compiler compiles the programs written in C or C++.

0 comments:

Post a Comment