Consider the following program main() { fork() ; fork() ; fork( ) ; } How many new processes will be created ?
Consider the following program main() { fork() ; fork() ; fork( ) ; } How many new processes will be created ? Correct Answer 7
Concept:
Fork system call is used to create a new process also called a child process or new process.
Formula:
With n fork system calls, number of new (child) processes created is 2n – 1.
Explanation:
Here there are 3 fork system calls in the given program.
new process created = 2n – 1= 23 – 1 = 7
মোঃ আরিফুল ইসলাম
Feb 20, 2025