Including the initial parent process, how many processes arecreated by these pro
ID: 3616512 • Letter: I
Question
Including the initial parent process, how many processes arecreated by these program? #include <stdio.h>#include <unistd.h>
int main()
{
//fork a child process
fork();
//fork another child process
fork();
//and fork another
fork();
return 0;
}
how many process are created? Including the initial parent process, how many processes arecreated by these program? #include <stdio.h>
#include <unistd.h>
int main()
{
//fork a child process
fork();
//fork another child process
fork();
//and fork another
fork();
return 0;
}
how many process are created?
Explanation / Answer
Dear.. On execution of the given code 8 processes are created. Each fork function call creates child process to parent we becalculate number of process as order 2n where n refersto number of fork functions. Hope this will help you...Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.