Question: Assume the code in FIG 1 ( below ) is submitted for execution. What will the code output? A . H 1 END B END
Assume the code in FIG below is submitted for execution. What will the code output?
A H END B END B H END A
B H END B H END B H END A
C H END A H END B END A
D None of the others.
FIG
int main void
pidt pid pid;
pid fork; fork a child process ASSUME FORK was SUCCESSFUL
if pid
printfH;
else
waitNULL;
pid fork ; fork a child process ASSUME FORK was SUCCESSFUL
if pid
waitNULL;
printfH;
If pid
printfEND A ;
else
printfEND B ;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
