What are the differences between compiler and interpreter?
There are differentiate between compiler and interpreter in the given below:
Compiler |
Interpreter |
A
compiler is a program that reads a program written in one language the source
program and translates it into an equivalent program in another language the
target program |
A program
that translates and executes each source language statement before
translating and executing the next instruction |
Compiler compiles the whole program at a time |
Interpreter reads line by line and then execute |
It requires more main memory |
It requires less main memory |
Compilers are often bigger than
interpreter |
Interpreters are smaller than
compilers |
The compiler is used by the language
such as c, c++ |
An interpreter is used by languages
such as java |
Example: |
Example: |
No comments