title: Why dividing two integers doesn't get a float?
body: <p>Can anyone explain why b gets rounded off here when I divide it by an integer although it's a float?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void main() {
      int a;
      float b, c, d;
      a = 750;
      b = a / 350;
      c = 750;
      d = c / 350;
      printf("%.2f %.2f", b, d);
      // output: 2.00 2.14
  }
  </code></pre>
  
  <p><a href="http://codepad.org/j1pckw0y">http://codepad.org/j1pckw0y</a></p>