title: What is the difference between the %PRId and %d format characters?
body: <p>Consider the following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;inttypes.h&gt;
  
  void main(void)
  {
      int32_t a = 44;
  
      fprintf(stdout, "%d\n", a);
      fprintf(stdout, "%"PRId32"\n", a);
  }
  </code></pre>
  
  <p>When is it better to use <code>%d</code> and when would it be better to use <code>"%"PRId32</code>? How do both of those format characters differ? Does this have something to do with how <code>int32_t</code> is typedeffed on your hardware/machine?</p>