Question-6: Which of the following are advantages of the Compiler over interpreter, once your code is translated using compiler?
- Once code is translated it runs faster compare to interpreter-based translation.
- Person who wants to run or execute translated code, he does not need compiler.
- Once code is compiled it is stored as a Machine Language.
- Once code is translated it run itself.
- Person who wants to run or execute translated code, he need interpreter only.
Answer: A,B,C
Exp:
Compilation Advantages
- Once code is translated it runs faster compare to interpreter-based translation.
- Person who wants to run or execute translated code, he does not need compiler.
- Once code is compiled it is stored as a Machine Language.
Interpretation Advantages
- In reality no need to translate code explicitly. It is taken care by programming language.
- As soon as you are done writing your program, it can be executed immediately, without you are explicitly translating it.
- Your code is stored as a simple text file only and not in the Machine Language format.
- There are different kind of computer architecture i.e. X86. You don’t have write code for each different architecture.