How do I turn int into float in C? : <p>I have a simple question in C. How do i turn an int value into a float, so I can add nonintegers to it. </p>

<p>Like say</p>

<pre><code>int i = 1;
</code></pre>

<p>How can I add 0.5 to i to get a float number 1.5?
I've tried:</p>

<pre><code>float j = (float)i + 0.5;
</code></pre>

<p>Doesn't seem to work. </p>

<p>Pleas help. </p>
