09 - Linkers, Loaders and use of libraries

 1. In programming, what is a module?

  A statement that allows code to be repeatedly executed

  Part of a program

  A hardware device that can be added to a computer

  Bespoke code that is uniquely written for each situation

 2. Ideally, modules should be …

  dependent on each other




 3. What would a programmer find in a library?

  Guidebooks on the best way to write code

  A collection of modules that can be used by or included in a program

  A table to convert source code into binary

  An index of memory locations in which data can be stored

 4. In MS Windows, a library is called a ...

  linked library driver (LLD)

  literary dynamic library (LDL)

  dynamic link library (DLL)

  linking dynamic library (LDL)

 5. Content from a library can be incorporated into a compiled programe or 'called' as an external file.



 6. Which of these options are advantages of using libraries:
1. Dynamic linking means less code has to be loaded into memory
2. Different programs can use the same modules
3. A programmer can save time by using existing code
4. The library modules should have already been tested 
5. If there is an error in the library it won't affect any programs

  All of these options

  1, 2, 3 and 4

  1, 3 and 4

  1 and 3

 7. What is a linker?

  A program that moves data between RAM and the hard drive

  A program that converts high level language into assembly language

  A cable that transfers data around the computer

  A program that combines modules to form an executable program

 8. Linkers can combine object files and objects from ______ .





 9. A linkage editor makes a relocatable executable program. A dynamic linker waits until load time or run time to make an executable program.



 10. What is the file usually called that tells a compiler how to compile and link a program?





 11. The ________ _______ made by the linker is then loaded into main memory by the loader.

  high-level language

  assembly code

  source code

  executable program

 12. The loader is part of the operating system (OS).



 13. Absolute loading uses ___ ____ main memory location each time.

  the same

  a different

  a random

  a sequential

 14. Relocatable loading uses relative addresses and ______ main memory locations may be used each time.





 15. Dynamic run-time loading generates an absolute address when an instruction is actually ________.