COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
in this case a single line is executed at a time, it is time consuming
A
ASSEMBLER
B
INTERPRETER
C
COMPILER
D
None of the above
Explanation: 

Detailed explanation-1: -An Interpreter directly executes instructions written in a programming or scripting language without previously converting them to an object code or machine code. An interpreter translates one line at a time and then executes it.

Detailed explanation-2: -Ans: If the process is considered, the Interpreter is faster than the compiler. However, once a program is compiled, Runtime or execution is faster for a compiled program over-interpreted ones.

Detailed explanation-3: -The compiler takes in the entire program together for analysis. The interpreter takes in one command line at a time for analysis. The compiler generates intermediate machine code.

Detailed explanation-4: -Interactive Line Interpreters Interpreted languages, such as Python, Ruby, and Perl permit scripts to be run line-by-line; whereas executable files (eg, C programs) are compiled and executed in toto, as though the entire program consisted of a single, long line of code.

There is 1 question to complete.