MCQ Practice

What is output of the following program? int main() { fork(); fork(); fork(); if (wait(0) == -1) printf("leaf childn"); }

A

"leaf child" will be printed 1 times

B

"leaf child" will be printed 3 times

C

"leaf child" will be printed 4 times

D

"leaf child" will be printed 8 times

Correct Answer: C