Difference between Interpreter and Compiler

Estudies4you

Interpreter

  • Interpreter is a kind of language processor
  • Instead of producing a target program as a translation, it directly executes the operations specified in the source program, on inputs supplied by the user, statement by statement
  • This can be shown as

Differences between Interpreter and Compiler

Compiler
Interpreter
Compiler is a program which takes one language (source program) as input and translates it into an equivalent another language (target program)
An Interpreter is a kind of translator which produces the result directly when the source language and data is given to it as input
Translates the entire program at a time
Translates program statement by statement
Shows up all the errors, if present, in the program at a time
Stops if any error occurs in running a statement and proceeds only after it is corrected
Once compilation is successfully completed, one can run the target code without using the compiler
Each execution must involve the interpreter as it is not going to generate any target code like compiler
Not so good as interpreter for interactive environments
Gives better error diagnostics than compiler and good for interactive environments
Faster process
Slower process
Examples: C,PASCAL etc.
Examples: BASIC, SNOBOL etc.


To Top