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 free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…