Question: Write all possible outputs of the following code int main(void) { int x = 1; } if (fork() else == 0) printf(Child has x
Write all possible outputs of the following code int main(void) { int x = 1; } if (fork() else == 0) printf("Child has x = ", ++x); printf("Parent has x =", --X);
Step by Step Solution
There are 3 Steps involved in it
The code provided is written in C and makes use of the fork system call which is used to create a ne... View full answer
Get step-by-step solutions from verified subject matter experts
