Address and return values of cin
<p>I'm a C++ beginner, and I was told that in codes like</p>

<pre><code>int a;  
if(cin&gt;&gt;a);
</code></pre>

<p>if the input is successful, cin will yield true and vice versa.<br>
But when I want to output the bool value,  </p>

<pre><code>cout&lt;&lt;boolalpha&lt;&lt;(cin&gt;&gt;a)&lt;&lt;endl;  
</code></pre>

<p>it gives an address:  </p>

<pre><code>0x6fcc41e8  
</code></pre>

<p>I was also told that <code>cin</code> is an object, but  </p>

<pre><code>cout&lt;&lt;&amp;cin&lt;&lt;endl;  
</code></pre>

<p>gives value  </p>

<pre><code>0x6fcc41e0
</code></pre>

<p>which is different by 8.<br>
a. Why the first <code>cout</code> gives a address rather than a bool value?<br>
b. Why two <code>cout</code> give different address?<br>
Thanks.</p>