Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Aptitude | GATE CS 1998 | Question 28

  • Last Updated : 30 Sep, 2020

A linker reads four modules whose lengths are 200, 800, 600 and 500 words respectively. If they are loaded in that order, what are the relocation constants?
(A) 0, 200, 500, 600
(B) 0, 200, 1000, 1600
(C) 200, 500, 600, 800
(D) 200, 700, 1300, 2100


Answer: (B)

Explanation: According to question  a linker reads four modules whose lengths are 200, 800, 600 and 500 words respectively. If first module loaded then it will start at address 0 and we know that Size is 200. hence it will occupy first 200 address and  last address being 199 because it start with 0 therefore  Second module will be present from 200  to 999 as   2nd module having length 800  and third module will start from 1000 to 1599 as its length is 600 similarly fourth module will start from 1600 to till 500 B.

Therefore relocation constant is 0, 200, 1000, 1600. For better understanding see the table below.

Module Number       relocation base    limit  ( length )     
10200
2200800
31000600
41600500


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!