Unpredictable Output in C++
<p>Here is a sample of source code</p>

<pre><code>#include &lt;iostream.h&gt;
#include &lt;conio.h&gt;
#include &lt;math.h&gt;
 int main()
{
    int i=2,a;
    a= pow(10,i);
    int b=0;
    b+=a;
    cout&lt;&lt;b;
    getch();
}
</code></pre>

<p>The ouput I expect is <code>100</code> as it is clear. But the compiler give <code>99</code> as output. Can anyone please explain what is the problem in the code and how it can b corrected to get <code>100</code> as output.</p>
