title: how to printf long double in C?
body: <p>[Update] The results would still be the same no matter I use <code>lf</code>, <code>Lf</code>, <code>llf</code>...I am using Code Blocks to compile and run my C program. I am using GNU GCC compiler.</p>
  
  <p>I tried to printf long double float type on different computers including two Windows and one Mac but it turns out that none of them is working as I expected. The code is the following:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      double d = 6.232345235;   //8 bytes
      long double ld = 5.5767458458;
  
      printf("%lf\n", ld);
      return 0;
  }
  </code></pre>
  
  <p>Either the return value is -0.000000 or another very huge negative number which I don't remember now.</p>
  
  <p>Any help is greatly appreciated! :D</p>