title: Getting "carry" in x + y
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/199333/best-way-to-detect-integer-overflow-in-c-c">Best way to detect integer overflow in C/C++</a>  </p>
  </blockquote>
  
  
  
  <p>If I have an expression <code>x + y</code> (in C or C++) where <code>x</code> and <code>y</code> are both of type <code>uint64_t</code> which causes an integer overflow, how do I detect how much it overflowed by (the carry), place than in another variable, then compute the remainder?</p>