Hi tm1. The above code creates a new process when it executes the fork call, this process will be an almost exact copy of the original process. Both process will continue executing sepotratly at teh return form, the fork call which begs the question "How do i know if im the new process or the old one?" since they are almost identical. To do this the fork designers made the fork call return different things in each process, in the new process (the child) the fork call returns 0 and the original process(the parent) fork returns the ID of the new process so the parent can interact with it.
So in the code the fork call creates a child process, both processes do the if statement seporatly. In the parent the return value is not zero so the parent executes the if statement. In the child the return value is 0 so it does the else statement. Hope this helps :-)