Difference Between compiler and Interpreter
The compiler is a program which program that translates computer code written in one programming language into another language. The name compiler is primarily used for programs that translate source code from a high-level programming language to a lower level.
The interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program.The Interpreters were used early as 1952 to ease programming within the limitations of computers at the time.
Difference of Compiler and Interpreter.
The compiler scans the whole program in one go.But the interpreter translates one statement at a time.
The execution time of interpreter being slow in executing the object code. It is preferred less.
Compiler usually generates intermediate code in the form of the object file(.obj).The interpreter doesn’t create an intermediate object (.obj) code.
Both the compiler and interpreter generally turn source code (text files) into tokens, both may (or may not) generate a parse tree, and both may generate immediate instructions
Detected error in the program get displayed after the entire program is read by compiler. The interpreter displayed the error and go.