title: Why does the value of this float change from what it was set to?
body: <p>Why is this C program giving the "wrong" output?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  void main()
  {
      float f = 12345.054321;
  
      printf("%f", f);
  
      getch();
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>12345.054688
  </code></pre>
  
  <p>But the output should be, <code>12345.054321</code>.</p>
  
  <p>I am using VC++ in VS2008.</p>