title: How do C/C++ compilers handle type casting between types with different value ranges?
body: <p>How do type casting happen without loss of data inside the compiler?</p>
  
  <p>For example:</p>
  
  <pre><code> int i = 10;
   UINT k = (UINT) k;
  
   float fl = 10.123;
   UINT  ufl = (UINT) fl; // data loss here?
  
   char *p = "Stackoverflow Rocks";
   unsigned char *up = (unsigned char *) p;
  </code></pre>
  
  <p>How does the compiler handle this type of typecasting? A low-level example showing the bits would be highly appreciated.</p>