Consider the following program include include include int m
Solution
a)
fork() is a functiona call in unix which created a process.so likely in the program we are having pid1 and pid2 with fork calls,but there is a condition that if the pid1=0 then you are pre-incrementing the i value and then u are creating the second process so if pid1=0 that means the process has not been created sucessfully so in that case pid2 is getting forked and hence it gets created.but there is another condition that whatif pid2 is also equals to 0
then yes definately when 1)both pid1=pid2=0 no process has been created
2) if either of the processes id is not equals to 0 then one process is definately created
b) 1st possibility:- if pid1=pid2=0 then i=4
2nd possibility:- if pid1!=0,pid2=0 then i=4,i=5
3rd possibility:- if pid1!=0,pid2!=0 then i=4,i=5,i=6,i=7
4th possibility:- if pid1=0,pid2!=0 then i=4
