title: How does difference in the format specifiers affect the value?
body: <pre><code>#define _CRT_SECURE_NO_WARNINGS
  #include &lt;stdio.h&gt;
  
  int main(void)
  {
      int a = 5;
      float b = 10;
      double c = 15;
      printf("%d %f %lf\n", a, a, a);
      printf("%d %f %lf\n", b, b, b);
      printf("%f\n", b);
      printf("%d %f %lf\n", c, c, c);
      printf("%lf\n", c);
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>5 0.000000 0.000000
  0 0.000000 0.000000
  10.000000
  0 0.000000 0.000000
  15.000000 
  </code></pre>
  
  <p>I fail to understand why it prints 0 in the first case for b and c, even for the proper matching format specifier?</p>
  
  <p>I am using Visual Studio.</p>