Linux fork() command

view story

http://stackoverflow.com – I wrote a program #include <stdio.h> #include <unistd.h> int main() { int returnVal = fork(); printf("Return Value: %i\n", returnVal); return 1; } 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. alwin@alwin-desktop:~/Projects/Nix$ ./a.out Return Value: 5547 Return Value: 0 (HowTos)