Home » Compiler Design » Compiler design miscellaneous » Question

Compiler design miscellaneous

  1. Consider a program P that consists of two source modules M1 and M2 contained in two different files. If M1 contains a reference to a function defined in M2, the reference will be resolved at
    1. edit time
    2. compile time
    3. link time
    4. load time
Correct Option: C

The two modules needed to be linked since definition exist & M2 & M1 refers it. So during linking phase M1 links to M2. Hence (c) is correct option.



Your comments will be displayed only after manual approval.