title: Fork output with waitpid
body: <pre><code>int main()
  {
      if(Fork() == 0)
      {
         printf("a");
      }
      else
      {
         printf("b");
         waitpid(-1, NULL, 0);
      }
  
      printf("c");
      exit(0);
  }
  </code></pre>
  
  <p>The above code asks what are the possible outputs?</p>
  
  <p>I find that, acbc, abcc, bacc but answer includes bcac. How can bcac be an answer? Is parent process exits before child process created or sth. else? I confused, any explanations are welcome.</p>
  
  <p>Thnx.</p>