A compiler is a program that convert the particular programming language in to the machine language, Compiler convert whole program at a time.
A interpreter is also a program that execute directly of a programming language or scripting language, Interpreter execute one statement of a program at a time.
The Intermediate Object Code is generated in a compiler but no intermediate Object Code is generated in an interpreter. In a compiler, the implementation of the conditional control statements is faster but the implementation of the conditional control statement for an interpreter is slower.
Both convert one level of language into another but there are few differences. The compiler executes the entire program at a time, but the interpreter executes each and every line individually. The execution of the program is fast in the compiler; in an interpreter the program execution speed is comparatively slow. Also the execution of the program in the interpreter is done line by line but the compiler executes the program on the whole.
Main difference between compiler in interpreter is process of error checking. Compiler check the whole program and then list out the whole error to user screen. If user correct the error then compiler re compile the program and convert it into low level language.
Interpreter checks the error statement wise.
When the program is written, compiler and interpreter are the next two stages which helps program in execution and to run successfully.
Compiler acts as the language translation path or medium, which converts the source code to the language compatible to machine and interpreter reads the code generated line wise, validating the syntax and getting it executed simultaneously.
Compiler and Interpreter both are a software used for compiling a program and these software are responsible for find the error and display it to the programmer.These software are inbuilt with the IDE of any programming language.
Compiler processed a program in a single step and generate errors in a bulk amount present in all lines of the program, whereas Interpreter compiles line by line of the program,if it finds a error in a line then it stops it process until the error is not removed.
Compiler generate the intermediate code that is called object code whereas Interpreter does not create intermediate object code.
Compiler compile once and run any time whereas the interpreted program interpreted line by line every time they are run.