title: When is memory allocated during compilation?
body: <p>When I write </p>
  
  <pre><code>int main()
  {
      int j;
  }
  </code></pre>
  
  <p>The memory for <code>j</code> is allocated at the time of compilation, but when during compilation?</p>
  
  <p>What are the various stages of compilation when memory is allotted to a variable?</p>
  
  <p>What if <code>j</code> were global?</p>