title: memory allocation for objects
body: <p>When we instantiate a variable in c++ like <code>int x</code> within a function(i.e. x is a local variable), it is allocated on top of stack of the process. But if we do <code>int *x= new int</code>, the space is provided in heap. </p>
  
  <p>So, my questions are:</p>
  
  <ol>
  <li><p>What about objects of different classes (classes provided by c++ or user defined)? Where are their objects instantiated? For example: Let Employee is a class and we declare <code>Employee emp;</code>. Where is <code>emp</code> given space-> on stack or in heap?</p></li>
  <li><p>If the declaration <code>int a[4]</code> is within a function, do all the four cells of <code>a</code> get space on stack?</p></li>
  </ol>