title: exact representation of floating points in c
body: <pre><code>void main()
  {
      float a = 0.7;
  
      if (a &lt; 0.7)
          printf("c");
      else
          printf("c++");
  } 
  </code></pre>
  
  <p>In the above question for 0.7, "c" will be printed, but for 0.8, "c++" wil be printed. Why?</p>
  
  <p>And how is any float represented in binary form?</p>
  
  <p>At some places, it is mentioned that internally 0.7 will be stored as 0.699997, but 0.8 as 0.8000011. Why so?</p>