title: typecasting to unsigned in C
body: <pre><code>int a = -534;
  unsigned int b = (unsigned int)a;
  printf("%d, %d", a, b);
  </code></pre>
  
  <p>prints <code>-534, -534</code></p>
  
  <p>Why is the typecast not taking place?</p>
  
  <p>I expected it to be <code>-534, 534</code></p>
  
  <hr>
  
  <p>If I modify the code to </p>
  
  <pre><code>int a = -534;
  unsigned int b = (unsigned int)a;
  if(a &lt; b)
    printf("%d, %d", a, b);
  </code></pre>
  
  <p>its not printing anything... after all <code>a</code> is less than <code>b</code>??</p>