Question- Consider the subsequent pseudo-code of a C program in UNIX.
int x=0;
int main()
{
for(i=0;i<2;i++)
{
fork();
x=x+5;
printf("%d ? %d \n", i, x);
}
return 0;
}
Part 1- Draw the process tree and expected output
Part 2- Repeat the exercise using 3 instead of 2 in the for statement