Behaviour of an empty class in c++
<p>I have written this small program:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

class a{
};

int main ()
{
a *obj=new a();
cout&lt;&lt;sizeof(obj)&lt;&lt;endl;
cout&lt;&lt;sizeof(*obj)&lt;&lt;endl;
delete obj;
}
</code></pre>

<p>Below is the output that i have got:</p>

<pre><code>&gt; ./a.out
4
1
&gt;
</code></pre>

<p>I can understand that its using 4 bytes for storing the address of the object.
But what i dont understand is that 1 byte.
since its an empty class i have got a doubt of what is the purpose of that 1 byte(size of the object).</p>

<p>My second question is will the default constructor be called?
if yes what would it basically do?</p>
