I am trying to create a program that uses fork() to create a new process. The sample output should look like so:
This is the child process. My pid is 733 and my parent\'
It is printing twice because you are calling printf twice, once in the execution of your program and once in the fork. Try taking your fork() out of the printf call.