Toal 6 process created
1.pid = fork(); // here 2 process will created.
Now, in those processes,1 process pid contains value 0 , that is called child process. and other one process contains non zero value, i.e. parent process.
2.if (pid == 0)
Now, from child process another process called, which also creates 2 process, 1 child and another parent.
Now, as fork() is a cloning method, it only call another fork() from last processes.
Now, in (1) only parent process is left which can create 2 processes, and in (2) both parent and child can create 2+2=4 processes.
So, total 6 processes can be created.
10 unique threads will be created