Consider the following segment of codes related to process creation. How many…

Coal India · Computer Science · 2017

Consider the following segment of codes related to process creation. How many times the message “child process created” will be printed?

#include <stdio.h>

void main()

{

fork();
fork();
fork();

printf("child process created");

}

  1. A.

    9

  2. B.

    7

  3. C.

    8

  4. D.

    3

Attempted by 839 students.

Show answer

Correct answer: C

The worked solution is available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…