Arithmetic operations on float values return unexpected answer : <p>If i print the value of x for : </p>

<pre><code>int a=1;
int b=6;
float x=(a/b);
</code></pre>

<p>The output is 0.0</p>

<p>But if i change the third line to 
    float x = (float)a/(float)b;</p>

<p>The output is 0.1666667(which it should be)</p>

<p>Why the difference?</p>
