title: How to printf "unsigned long" in C?
body: <p>I can never understand how to print <code>unsigned long</code> datatype in C.</p>
  
  <p>Suppose <code>unsigned_foo</code> is an <code>unsigned long</code>, then I try:</p>
  
  <ul>
  <li><code>printf("%lu\n", unsigned_foo)</code></li>
  <li><code>printf("%du\n", unsigned_foo)</code></li>
  <li><code>printf("%ud\n", unsigned_foo)</code></li>
  <li><code>printf("%ll\n", unsigned_foo)</code></li>
  <li><code>printf("%ld\n", unsigned_foo)</code></li>
  <li><code>printf("%dl\n", unsigned_foo)</code></li>
  </ul>
  
  <p>And all of them print some kind of <code>-123123123</code> number instead of <code>unsigned long</code> that I have.</p>