title: What does fflush do before fork operation?
body: <p>I wanted to know how many times does <code>printf</code> print "PROCESS" if the snippet below is given:</p>
  
  <pre><code>int main()
  {
      printf("PROCESS");
      fflush();
      fork();
      fork();
  }
  </code></pre>
  
  <p>Please explain the logic both with and without <code>fflush();</code>.</p>