Whenever fork is called, a new process is created and statements after fork will be executed in all the processes which are available at that time.
So after 1st fork 2 processes will be there with i=2(parent and child),
then 4 processes with i=3 after 2nd fork.
3 3 3 3
And finally after 3rd fork 8 processes will be there with i=4.
4 4 4 4 4 4 4 4
But order can be different based on whether parent process or child process executes first.
So we can get any of first 3 options as output.