Question: List all of the possible output sequences for the following program: 1 int main() 2 { 3 4 5 6 7 8 9 10 11
List all of the possible output sequences for the following program:

1 int main() 2 { 3 4 5 6 7 8 9 10 11 12 } if (Fork() == 0) { printf("9"); fflush(stdout); } else { printf ("0"); fflush(stdout); waitpid (-1, NULL, 0); } printf ("3"); fflush(stdout); printf ("6"); exit(0);
Step by Step Solution
3.39 Rating (158 Votes )
There are 3 Steps involved in it
We know that the sequences 936036 903636 and 093636 are possible becau... View full answer
Get step-by-step solutions from verified subject matter experts
