What is Diffrence Between Compiler and Interpreter
Compiler : Compiler is a program that can read a program in one language and translate it in to an equivalent program in another language. In general case, input program is called source language and output program is called target language. it may be machine language.most important role of compiler is to report error in the source program.
Here we discuss basic difference between compiler and interpreter on behalf of there working :-
Compiler
Interpreter
Compiler take whole
program as input and then translate it in another language.
Interpreter
actually read input line by line and translate them
if they have no error.
Compiler is fast because
it execute whole bunch of code once.
Interpreter
interpret input line by line so it takes more
time to execute source program.
Compiler shows all the
error after compiling program.
In case of
interpreter, if any line have error then interpreter
shows that error before going to
next line.
Compiler
|
Interpreter
|
Compiler take whole
program as input and then translate it in another language.
|
Interpreter
actually read input line by line and translate them
if they have no error.
|
Compiler is fast because
it execute whole bunch of code once.
|
Interpreter
interpret input line by line so it takes more
time to execute source program.
|
Compiler shows all the
error after compiling program.
|
In case of
interpreter, if any line have error then interpreter
shows that error before going to
next line.
|
No comments