The Gateway to Computer Science Excellence
+23 votes

Consider a program $P$ that consists of two source modules $M_1$ and $M_2$ contained in two different files. If $M_1$ contains a reference to a function defined in $M_2$ the reference will be resolved at 

  1. Edit time
  2. Compile time
  3. Link time
  4. Load time
in Compiler Design by Veteran (52.2k points)
edited by | 1.6k views
edit time ???
It is the time when we write(or Edit) the program.

2 Answers

+40 votes
Best answer

answer - C. Each module is compiled separately and then linked together to make the executable. The below commands shows how to do this for two modules $c1.c$ and $c2.c$ using $gcc$. 

gcc -c c1.c -o c1.o
gcc -c c2.c -o c2.o
gcc c1.o c2.o -o C.exe
by Loyal (8.6k points)
edited by
+17 votes
Linker are the one responsible for resolving external references . so it is link time
by Loyal (9.9k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,385 answers
105,343 users