can someone explain How many child processes do this program create?the answer is 127, but I couldn't understand how they got it.
int create(int num){int i;for(i=0;i<num;i++)fork();}int main() {int i;fork();for(i=0;i<4;i++)create(i);return 0; }
can someone explain How many child processes do this program create?the answer is 127, but I couldn't understand how they got it.
int create(int num){int i;for(i=0;i<num;i++)fork();}int main() {int i;fork();for(i=0;i<4;i++)create(i);return 0; }