default constructor initialisation
<p>Consider this code:</p>

<pre><code>class First
{
public:
    int y;
    First()
    {
        y = 90;
    }
};

class Second{
    public:
       int x;
       First ob;  //if i comment it, value of x is initialised to zero
};

int main()
{
    Second obj = Second();
    cout &lt;&lt; obj.x &lt;&lt; endl;
}
</code></pre>

<p>This program gives different output when I change it:</p>

<ol>
<li>If I comment out the line <code>First ob;</code> then value of x is initialised to zero</li>
<li>If the class consists object of class First, then member has garbage value.</li>
<li>If I create object like <code>Second obj;</code> then it has garbage value.</li>
</ol>

<p>What is the reason it behaves differently when Second class consists only built-in members and when object of another class?</p>

<p>And what is the difference between these statements:</p>

<pre><code>Second obj = Second();
Second obj;
</code></pre>
