1,658 views

1 Answer

2 votes
2 votes

2n  +1     

Try drawing a tree to understand how each fork works.

http://www.csl.mtu.edu/cs4411.ck/www/NOTES/process/fork/create.html

edited by

Related questions

2 votes
2 votes
3 answers
2
Philosophical_Virus asked Dec 10, 2023
768 views
Int main (){fork();printf("a");fork();printf("b");return 0;}How many distinct outputs are possible of above code? And also give outputs
3 votes
3 votes
1 answer
3
24aaaa23 asked Oct 1, 2023
723 views
Consider the following code segment :int main (void) { for (int i=2; i<=5; i++) { fork( ); }printf (“GOCLASSES”);How many times “GOCLASSES” is printed by the ab...
0 votes
0 votes
0 answers
4