The linkera)Is similar to interpreterb)Uses source code as its inputc)...
Explanation: It is a program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another object file.
View all questions of this test
The linkera)Is similar to interpreterb)Uses source code as its inputc)...
Explanation:
The correct answer is option 'C': It is required to create a load module.
Let's understand each option one by one:
a) Is similar to interpreter:
- Linker is not similar to an interpreter. An interpreter executes the source code line by line without creating any executable file.
- Linker, on the other hand, is a program that combines multiple object files and libraries to create an executable file.
b) Uses source code as its input:
- This statement is not true. A linker does not take source code as its input.
- The input to a linker is object files generated by the compiler.
c) Is required to create a load module:
- This statement is true. A linker is required to create a load module or an executable file.
- The linker combines object files generated by the compiler and resolves external references, relocations, and other dependencies to create a load module that can be loaded and executed by the operating system.
d) None of the mentioned:
- This option is incorrect because the linker is required in the process of creating an executable file.
To summarize, a linker is a program that takes object files generated by the compiler as input and combines them to create a load module or executable file. It resolves external references, relocations, and other dependencies to create a complete and executable program.