title: decimal to hex conversion in C
body: <p>I need to conver decimal numbers to 4 digit lower-case hex numbers prefixed by <em>0x</em>.<br>
  "%X" is good enough, but this is not exactly what I want.</p>
  
  <pre><code>printf("hex num is: %X\n", num);
  </code></pre>