GATE - 2004 | OS | A process executes the following segment of code for(i = 1

GATE - 2004 | OS | A process executes the following segment of code for(i = 1
Posted on 22-02-2022

GATE - 2004 [Operating System]

Question:

A process executes the following segment of code :

 for(i = 1; i < = n; i++)

fork ();

The number of new processes created is

A

n

B

 

C

2n - 1

D

3n - 1

  

Solution:

Option (C) is Correct.

The number of new processes or child processes created is,
2n - 1.

Thank You

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh