Difference between while(i=0) and while(i==0)
<p>In my exam the following problem appeared in C++</p>

<p>Code:</p>

<pre><code>int i,n;
int* A
cin&gt;&gt;n;
A=new int[n]
for(int i=0;i&lt;n;i++) cin&gt;&gt;A[i];

while(i=0){
   cout&lt;&lt;A[i]&lt;&lt;endl;
   i=i-1;
}
}
</code></pre>

<p>What will be the output?
I think that it should go into indefinite loop!</p>
