ISRO Computer Science (CSE) 2015 - Question 37

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2015

Consider the following program: main() { fork(); fork(); fork(); } How many new processes will be created?

  • A. 8
  • B. 6
  • C. 7
  • D. 5

Answer: C. 7

Explanation: 3 consecutive forks create 2^3 - 1 = 7 new processes.

| | All questions of ISRO Computer Science (CSE) 2015