COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Compilers, assemblers and interpreters are examples of this.
A
Translator
B
Run time environment
C
Editor
D
Error diagnostics
Explanation: 

Detailed explanation-1: -Hence, Compiler, Interpreter, and Assembler are types of language processors that convert programming languages to machine language (binary code). Compilers and interpreters are used to convert High-Level Language into machine language.

Detailed explanation-2: -Assemblers are a third type of translator. The purpose of an assembler is to translate assembly language into object code. Whereas compilers and interpreters generate many machine code instructions for each high-level instruction, assemblers create one machine code instruction for each assembly instruction.

Detailed explanation-3: -A compiler translates the entire source code in a single run. An interpreter translates the entire source code line by line. It consumes less time i.e., it is faster than an interpreter. It consumes much more time than the compiler i.e., it is slower than the compiler.

Detailed explanation-4: -C, C++, C#, Java are compiler-based programming languages. PHP, PERL, Ruby are interpreter-based programming languages. CPU utilization is higher in compilers.

Detailed explanation-5: -A compiler is a translator used to convert high-level programming language to low-level programming language. It converts the whole program in one session and reports errors detected after the conversion.

There is 1 question to complete.