MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Relocatable machine code is produced by the
A
Compiler
B
Interpreter
C
Loader
D
Assembler
Explanation: 

Detailed explanation-1: -Basically, “absolute” mode means that the code and RAM variables will be placed exactly where you tell the assembler it will be, while “relocatable” means the assembler builds code chunks and specifies RAM needs that can be placed wherever the linker finds room for them.

Detailed explanation-2: -Relocatable code is software whose execution address can be changed. A relocatable program might run at address 0 in one instance, and at 10000 in another. Just to confuse the issue, partially built programs are composed of object modules unfortunately called “relocatables".

Detailed explanation-3: -The assembly language is then processed by a program called an assembler that produces relocatable machine code as its output.

Detailed explanation-4: -An object file is a computer file containing object code, that is, machine code output of an assembler or compiler. The object code is usually relocatable, and not usually directly executable.

There is 1 question to complete.