How default assignment operator works in struct?
<p>Suppose I have a structure in C++ containing a name and a number, e.g.</p>

<pre><code>struct person {

char name[20];

int ssn;

};
</code></pre>

<p>Suppose I declare two person variables:</p>

<pre><code>person a;

person b;
</code></pre>

<p>where a.name = "George", a.ssn = 1, and b.name = "Fred" and b.ssn = 2.</p>

<p>Suppose later in the code</p>

<pre><code>a = b;

printf("%s %d\n",a.name, a.ssn);
</code></pre>
