Why happens to variable when cin breaks? C++
<p>I have the following code snippet:</p>

<pre><code>    int a = 1;
    double b = 3.14;
    string c = "hi";

    cin &gt;&gt; a &gt;&gt; b &gt;&gt; c;
    cout &lt;&lt; a &lt;&lt; " " &lt;&lt; b &lt;&lt; " " &lt;&lt; c &lt;&lt; endl;
</code></pre>

<p>If I enter <code>apple 11 tammy</code>, why does it cout: <code>0 3.14 hi</code> instead of: <code>1 3.14 hi</code>?</p>

<p>Why does the value of <code>a</code> change when <code>cin</code> is broken?</p>