title: Why size of char is 4 bytes in memory and empty class is 1 byte
body: <p>Good time of day!</p>
  
  <p>I wrote some code, but I cannot understand some strange memory anomalies. Could anybody, who has a proper knowledge in class memory using give me a explanation?</p>
  
  <p>My code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class O
  {
      O();
      ~O();
  };
  
  class A
  {
  public:
      A();
      ~A();
      void someFunc();
  private:
      int m_a;
  };
  
  class B: public A
  {
  public:
      B();
      virtual ~B();
  private:
      int m_b;
  };
  
  class C: public B
  {
  public:
      C();
      ~C();
  private:
      char m_c;
  };
  
  int main()
  {
      cout &lt;&lt; sizeof(char) &lt;&lt; endl;
      cout &lt;&lt; sizeof(int) &lt;&lt; endl;
      cout &lt;&lt; sizeof(O) &lt;&lt; endl;
      cout &lt;&lt; sizeof(A) &lt;&lt; endl;
      cout &lt;&lt; sizeof(B) &lt;&lt; endl;
      cout &lt;&lt; sizeof(C) &lt;&lt; endl;
      cin.get();
      return 0;
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>1  //normal for char
  4  //normal for int on x32
  1  //why empty class occupies 1 byte?
  4  //int m_a.  Where is 1 byte?
  12 //4B virtual function, 8B - m_a and m_b.
  16 //char needs 1 byte. Why it gets 3 more?
  </code></pre>
  
  <p>Thank you for attention and answers )</p>