|What is Compiler and Interpreter?|
Johny! Why you are so dull today?
Remember these points:
In other words,
Both are used for translating from High Level Language into Low Level Language.
3) Interpreter translates ONLY ONE STATEMENT AT A TIME
in other words,
Interpreter translates LINE BY LINE
4)But Compiler translates in ONE STRETCH.
5. For fast opertion, Compiler is prefered.
6. For interactive operations, Interpreter is prefered.
Johny, can you remember, we attened a christian meeting last month. One foreigner was giving a speech. One local person was translating his speech.
Yes,Dad, The foreiner was telling just four words " Once upon a time." . Immediately our local man translated it into our local language.
Now, tell me, whether he was INTERPRETING or COMPILING his speech ?
He was interpreting only. Because , he was translating every line and disposing it then and there. Compilation means, he should completely observe the foreigner speech fully and finally he has to deliver the output in one go.
Very good. Interpreter and compiler work in the same way. Again read the six points given above and you will never forget the answer.