title: How does the statement a = a ^ b work in c++?
body: <p><strong>in some languages...</strong> I know this is serves as the exponential operator.
  But in the following C++ code I believe this is being used to swap <code>char &amp;a</code> and <code>char &amp;b</code>. I'm looking to understand what is going on underneath the surface and how this statement works if does indeed do what I think it does.</p>
  
  <pre><code>void  swap ( char  &amp; a ,  char  &amp; b ) { 
  a  =  a ^ b ; 
  b  =  a ^ b ; 
  a  =  a ^ b ; 
  }
  </code></pre>