title: Why class size depend only on data members and not on member functions?
body: <p>I want to know the detail description on the size of a class.
  I want to know if there is only data members &amp; member function without any virtual keyword then why the class size depends only on data members.
  For an eg:</p>
  
  <pre><code>class A {
      int a;
  public:
      int display() { 
      cout &lt;&lt; "A=" &lt;&lt; a &lt;&lt; endl;
     }
  };
  </code></pre>
  
  <p>When I check the <code>sizeof(A)</code> i found that it is 4 byte. Why it is so? Why member function has no effect on the size of class A?</p>
  
  <p>Thanks</p>