• edited by
9,731 views
36 36 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

2 Answers

Best answer
68 68 votes

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
• edited by
Answer:
Position:
Show:

Related questions

36 36 votes
5 answers 5 answers
20.3k
20.3k views
Kathleen asked Sep 18, 2014
20,301 views
Consider the following functionvoid swap(int a, int b) { int temp; temp = a; a = b; b = temp; }In order to exchange the values of two variables $x$ and $y$.call $swap(x, ...
59 59 votes
5 answers 5 answers
23.0k
23.0k views
Kathleen asked Sep 17, 2014
23,033 views
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statistically linked libraries?Smaller sizes of executable fi...
57 57 votes
6 answers 6 answers
14.5k
14.5k views
Kathleen asked Sep 18, 2014
14,528 views
The following finite state machine accepts all those binary strings in which the number of $1$’s and $0$’s are respectively: divisible by $3$ and $2$odd and eveneven ...
51 51 votes
7 answers 7 answers
21.8k
21.8k views
Kathleen asked Sep 18, 2014
21,805 views
The minimum number of colours required to colour the following graph, such that no two adjacent vertices are assigned the same color, is$2$$3$$4$$5$