A process executes the following segment of code : for(i = 1; i < = n; i++)…

GATE · 2004 · IT

A process executes the following segment of code :

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

fork (); 

The number of new processes created is  

  1. A.

    n

  2. B.

    ((n(n + 1))/2)

  3. C.

    2n - 1

  4. D.

    3n - 1

Attempted by 1149 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…