Gate
Exam
A process executes the code
fork();
fork();
fork();
The total number of child processes created is
option
(A) 3
(B) 4
(C) 7
(D) 8
Read Solution (Total 1)
-
- L1 // There will be 1 child process created by line 1
/
L2 L2 // There will be 2 child processes created by line 2
/ /
L3 L3 L3 L3 // There will be 4 child processes created by line 3
so that here is ans 7 is correct. - 8 years agoHelpfull: Yes(0) No(0)
Gate Other Question