You're better off leaving fork() alone for a while if all you've got is 2 days experience with C
I hope you weren't expecting to share memory between these two processes, because fork() doesn't do that.
Code:
pid_t pid = fork();
if ( pid == 0 ) {
// stuff for child only
// this normally exits the process when its done
} else if ( pid != -1 ) {
// stuff in parent, if child runs
} else {
// stuff in parent, with no child
}
// stuff "common" again
// except its not really common, both processes do the same work