Question: Experiment with Forks Run the above code and answer the following question: 1) Notice that mynum is a global variable. --> Child is incrementing the
Experiment with Forks

Run the above code and answer the following question:
1) Notice that mynum is a global variable.
--> Child is incrementing the ascii value of mynum
--> Parent is not
--> Child and Parent can take turns running
Why does child print CHILD0, CHILD1, CHILD2, etc whereas parent prints PARENT0, PARENT0, PARENT0, etc? Remember mynum is a global variable.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
