MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which component of a language preprocessor solves external memory addresses?
A
Loader
B
Interpreter
C
Linker
D
Assembler
Explanation: 

Detailed explanation-1: -A LOADER/LINK-EDITOR performs the following tasks. The link-editor makes a single file from several files of relocatable machine code. translates a relocatable machine code into an absolute machine code, places it in memory at the proper locations.

Detailed explanation-2: -preprocessor utility generates the C source to be compiled. compiler compiles the C source into object code generating a set of object files. linker links the various object files along with any libraries into executable file.

Detailed explanation-3: -The linker creates the executable module, which is taken by the loader. To generate an executable code, the linker combines all the object modules and source code. In the main memory, it loads executable codes for further execution.

Detailed explanation-4: -The C compiler, compiles the program and translates it to assembly program (low-level language). An assembler then translates the assembly program into machine code (object). A linker tool is used to link all the parts of the program together for execution (executable machine code).

Detailed explanation-5: -A linker is an important utility program that takes the object files, produced by the assembler and compiler, and other code to join them into a single executable file. A loader is a vital component of an operating system that is accountable for loading programs and libraries.

There is 1 question to complete.