title: Why does my cout output not appear immediately?
body: <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;&quot;||&quot;;
      sleep(1);
  }
  </code></pre>