MCQs > IT & Programming > C++ > This code? while (numforks= maxf) { wait(NULL); numforks--; } }

C++ MCQs

What does the following code? while (numforks<maxf) { pid_tpid = fork(); if (pid == 0) { //do something exit(1); } else { numforks++; } while (numforks>= maxf) { wait(NULL); numforks--; } }

Answer

Correct Answer: Creates Maximum maxf child processes and wait until they are finished

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C++ Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it