Cout in While loop Strange behaviour
<p>My code look like below</p>

<pre><code>int i=0;
while(i&lt;10){
cout&lt;&lt;"Hello";
sleep(1);
i++
}
</code></pre>

<p>In Windows the code prints on each loop but in Linux it prints everything after exiting while loop . And also if I put an <strong>endl</strong> at the last of <strong>cout</strong> then it prints on each loop. Why this happening ?. Can anyone explain this behavior?. </p>
