Floating point number is rounding off in C : <p>i started learning <code>c</code>. Today, while i am working on a program, i found an interesting thing and i made another small program (similar to my issue) to check it.</p>

<pre><code>#include&lt;stdio.h&gt;
int main(void)
{
    float num1=867.0;
    float num2=.6921;
    printf("sum = %.4f \n",num1+num2);
    return 0;
}
</code></pre>

<p>if i run the above program, i am getting <code>867.6921</code> as the answer. but if i changed the <code>.4%f</code> to <code>%f</code> the answer is changing to <strong><code>sum = 867.692078</code></strong>. why's the change in the output? Also, is there any way that i can get the answer without using the <code>.4%f</code>?</p>
