title: C float or double in printf format specifier and pow function
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  int main(void){
  
     printf("%lf\n", pow(1.0, 2.0));
     printf("%f\n", pow(1.0, 2.0));
  
     return 0;    
  }
  </code></pre>
  
  <p>First <code>printf()</code> gives output <code>0.000000</code> but second <code>printf()</code> gives output <code>1.000000</code>. Why?</p>
  
  <p>Using Codeblocks on Windows 7 64 bit.</p>
  
  <p>Using gcc command to compile give me an .exe that outputs 1.000000 for both statements. </p>
  
  <p>If I compile pressing F9 on Codeblocks, I get 0.000000 for the first statement and 1.000000 for the second. </p>
  
  <p>Finally, if I remove <code>#include &lt;stdio.h&gt;</code> from source code in Codeblocks, all give me 1.000000 (no warnings or errors).</p>