A process executes the following code
for(i=0; i<n; i++) fork();
The total number of child processes created is
Each fork() creates a child which start executing from that point onward. So, number of child processes created will be 2n - 1.
At each fork, the number of processes doubles like from 1 - 2- 4 - 8 ... 2n. Of these except 1, all are child processes.