During the entire lifespan of this program, how many times is fork() being…
During the entire lifespan of this program, how many times is fork() being called?
// program 1
for ( i=0; fork(); i++ )
{
If ( i==6 ) { break ; }
printf (“PID: %d, i=%d\n”, getpid(), i );
}
Attempted by 200 students.
Sign up free to check your answer
Sign up freeLoading lesson…

