title: Linux fork() command
body: <p>I wrote a program</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  
  int main()
  {
      int returnVal = fork();
      printf("Return Value: %i\n", returnVal);
      return 1;
  }
  </code></pre>
  
  <p>when I compile this and run, I get the following output
  I have given only one printf statement then why do I see 2 prints. If I remove the print then nothing is printed.</p>
  
  <pre><code>alwin@alwin-desktop:~/Projects/Nix$ ./a.out 
  Return Value: 5547
  Return Value: 0
  </code></pre>