Question: 1. Process (30 points) #include int value = 5; int main pid t pid pid = fork (): printf (failed to fork a new process.n):

1. Process (30 points) #include int value = 5; int main pid t pid pid = fork (): printf (failed to fork a new process.n"): exit (1) value += 15. printf("pid=%d, value-d n", pid, value); The above C program creates a child process using the system call fork0. If the child process is created successfully, (1) what will be the output? (Assume the created new child process pid-1000.) (2) How many lines will it output? If your answer is one line, then skip the next question. Otherwise, continue. (3) If we want to output the message only once, in the parent process, how will you modify the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
