title: where memory for extern variable will be stored and by which file
body: <p>I read about extern variable, but no where found answer related to its memory allocation, My question is Who will allocate memory for Extern variable, and in which memory segment.</p>
  
  <pre><code>int a; // file 1
  
  extern int a; // file 2
  </code></pre>
  
  <p>here file 1 will allocate memory for a or file 2. In data segment or in stack ?</p>
  
  <p>Thanks.</p>