title: In which memory segment the member variables reside?
body: <p>I am curious to know where the initialized member variable sit in the memory? i.e., css, bss, data segment, heap...</p>
  
  <p>Don't curse me if my question is stupid :)
  For example</p>
  
  <pre><code>class A
  {
      A();
      int m_iVar;
  }
  
  A::A(int i)
  {
      m_iVar = i;
  }
  
  A::A()
  {
      m_iVar = 99;
  }
  
  main()
  {
      A o; // =&gt; After compilation, the object o, in which segment does it reside? and especially  where does "m_iVar" reside
      A o1(5); // =&gt; After compilation here object o1, in which segment does it reside?and especially where does "m_iVar" reside?
  
      A *pA = new A; // After compilation, here the memory pointed by pA, I guess it goes to heap, but the variable "m_iVar" where does it reside
  }
  </code></pre>