C++ float to int
<p>Maybe, it's very simple question but I couldn't get the answer. I've been searching quite a while ( now Google think that I'm sending automated queries <a href="http://twitter.com/michaelsync/status/17177278608">http://twitter.com/michaelsync/status/17177278608</a> ) .. </p>

<pre><code>int n = 4.35 *100;
cout &lt;&lt; n;
</code></pre>

<p>Why does the output become "434" instead of "435"? 4.35 * 100 = 435 which is a integer value and this should be assignable to the integer variable "n", right? </p>

<p>OR Does the C++ compiler cast 4.35 to integer before multiplying? I think it won't. Why does the compiler automatically change 4.35 to 4.34 which is still a float?? </p>

<p>Thanks.</p>
