Question: Suppose you run the following program on your shell. #include #include int i,j = 0; main() { i++; // i=i+1; printf(%d , i); fork(); i+=8;

Suppose you run the following program on your shell. #include #include int i,j = 0; main() { i++; // i=i+1; printf(%d , i); fork(); i+=8; // i=i+8; for (j=0; j<10,000; j++) i+=odd(j); printf(%d , i); fork(); i+=13; // i=i+13; printf(%d , i); fork(); i+=19; // i=i+19; printf(%d , i); } Q1) Please explain what you would expect to see on your screen at run-time of the program and why. Is there only one potential output or more? Which? List them all. Show exactly how many output lines you get and justify why

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!