Q. What is a compiler and interpreter?
Ans:
The difference between a compiler and interpreter is as follows:-
Ans:
The difference between a compiler and interpreter is as follows:-
Compiler
|
Interpreter
|
It
converts the whole programme(source code) into machine code at once.
|
It
converts the whole programe(souce code) into machine code one line at a time
|
It
creates an object file
|
It
does not create any object file
|
It
converts the source code into machine code that can be executed or run many
times as you need.
|
It
needs to convert the source code into machine code every time you need to run
the program.
|
Its
converted programs run faster
|
Its
converted programs run slower
|
It
indicates the errors after the whole program is converted into machine code
|
It
indicates the error on every line it converts in machine code. It stop until
you remove the error in that particular line.
|