title: unsigned int storing signed value
body: <p>Coming from a typeless language (PHP) I'm a bit confused about datatypes in C. I'm facing the following strange behavior.</p>
  
  <pre><code>//First case
  unsigned int a;
  a = -1;
  printf("a = %u", a); //Outputs a strange number, no problem here
  
  //Second case
  unsigned int a;
  a = -1;
  printf("a = %d", a); //Outputs -1
  </code></pre>
  
  <p>What I don't understand is how <code>a</code> "contained" a signed value after we specifically said it's <code>unsigned</code>?</p>
  
  <p>How can only formatting the output in the second case do that?</p>