Why does my cout output not appear immediately?
<p>it does not print the string put in the loop. The program was written with the help of G++, with sys/types.h header file included</p>

<pre><code>for(int i=0;i&lt;9;i++)
{
    cout&lt;&lt;"||";
    sleep(1);
}
</code></pre>
