How can uint64_t store a negative number? - Isn't it meant to be unsigned
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/50605/signed-to-unsigned-conversion-in-c-is-it-always-safe">Signed to unsigned conversion in C - is it always safe?</a>  </p>
</blockquote>



<p>How can uint64_t store a negative number? - isn't it meant to be unsigned or is my code dangerous and it's working by fluke?</p>

<p>In the code I assign a negative number to <strong>uint64_t uint64_neg</strong> ( i expect the negativeness, the sign to be lost) then assign the uint64_t to a int64_t but the negativeness is still there - why does this work please ?</p>

<pre><code>uint64_t uint64_neg = -150;

int64_t int64_neg = uint64_neg;
</code></pre>

<p>Thanks a lot.</p>
