x = fork(); 2 processes are in progress.
if (y>0) fork(); will never be executed.
if (x==0) y=fork();will be executed by the child process, so now 3 processes are running. For the original parent y, still 0. For this child y == child_child pid, and for the child child - y==0.
All 3 processes will be executed fork(), therefore only 6 processes, of which 4 have y==0in their memory.
4 fork , 8 , printf(...);