CODE GENERATION
ROLE OF CODE GENERATION
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Assembler
|
|
Compiler
|
|
Interpreter
|
|
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 program that converts a high-level language source file into a machine-language file is called a compiler.
Detailed explanation-3: -Compilers convert high-level language code to machine (object) code in one session. Compilers can take a while, because they have to translate high-level code to lower-level machine language all at once and then save the executable object code to memory.
Detailed explanation-4: -A translator is required to translate the assembly language to machine language. This translator program is called the ‘assembler.