ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
ASSEMBLER
|
|
INTERPRETER
|
|
COMPILER
|
|
None of the above
|
Detailed explanation-1: -The correct answer is Compiler. A compiler takes the program code (source code) and converts the source code to a machine language module (called an object file).
Detailed explanation-2: -A compiler is a special program that translates a programming languageās source code into machine code, bytecode or another programming language. The source code is typically written in a high-level, human-readable language such as Java or C++.
Detailed explanation-3: -This machine level code is called as object program.
Detailed explanation-4: -Source code is generally understood to mean programming statements that are created by a programmer with a text editor or a visual programming tool and then saved in a file. Object code generally refers to the output, a compiled file, which is produced when the Source Code is compiled with a C compiler.
Detailed explanation-5: -The difference between compiler and assembler is that a compiler is used to convert high-level programming language code into machine language code. On the other hand, an assembler converts assembly level language code into machine language code. Both these terms are relevant in context to program execution.