title: At what exact moment is a local variable allocated storage?
body: <p>Suppose we have the following:</p>
  
  <pre><code>void print()
  {
       int a;  // declaration
       a = 9;
       cout &lt;&lt; a &lt;&lt; endl;
  }
  
  int main ()
  {
       print();
  }
  </code></pre>
  
  <p>Is the storage for variable a allocated at the moment function print is called in main or is it when execution reaches the declaration inside the function?   </p>