Firstly , fork will be called on p1 and it will return one parent p1 and one child c1 process . parent will contain some +ve value (let it be 1) and child will contain 0 .
Now there is and in between two forks and the property of and is if the first value will be 1 then only we will execute other else we will not execute other , so as p1 is 1 so we will call fork for only p1 not for c1... And as a result p1 will give two process parent(p1) and child (c2) .
Now as its not(fork) so c2 will return 1 and p1 will return 0 .and so c2 wil continue on next line as it will return 1
Now c2 will give two process parent (c2) and child (c3) and as it is or so if the first condition is true we will not execute 2nd condition , so c2 will dirctly go to next line and c3 as it returned 0 will execute 2nd condition fork .
so finally we will have 7 4's printed