Difference between compilers and interpreters

Difference Between compilers and Interpreters

Ganesh Tripathi

--

Hi Reader’s today in this article today we discuss about the main and the important difference between complier and interpreter. Most of the programming beginners are very confuse between this two concepts and their function during the execution of the program. Let’s start

Compilers:-

Compliers translate the program instruction by instruction and generate the object code file and then this object file is later on executed. Compilers convert our program into machine understandable code so our machine can able to understand our programming logic and gives us a desired output.

Key point remember about compilers

  1. Compiler take the entire program and converts into the object code for the program.
  2. Program need to compile every time before the execution. For example if we make changes in our program we need re-compile every time to replace the code present in object file with newly added code.
  3. In compilers the list of errors in generated after the whole program is checked.
  4. Memory requirements for the compiler is more because of object file generation.
  5. Compiler does not evolved in the execution of the program. It only check the error in program like syntax error, variable declaration , data type checking and memory overflow.

Interpreters:-

Interpreter take single line of program instruction and execute it so we can say that interpreter execute the program line by line and the errors shown for each line.

key point to remember about Interpreters

  1. Interpreter take single line of instruction covert into object code and then execute it.
  2. Conversion from high level code to machine code is performed every time since each instruction is executed every time.
  3. Errors are shown for each line.
  4. Memory requirements for the interpreter is very less since no object file is created.
  5. Interpreter involved in the execution of the program.

--

--