Professional KnowledgeHardIBPS SO IT

Number of times Hello prints for: fork(); fork(); printf("Hello"); (each of the processes prints once)

  1. A. 2
  2. B. 3
  3. C. 4
  4. D. 8

Correct answer: C. 4

Two forks lead to 4 processes, each printing.

More IT Officer Professional Knowledge (IBPS SO) questions

Exams that ask this topic