Which of the following statements correctly describe the return values of the…

PYQ IBPS SO CRP SPL-XIII (2023)Modified — slightly modified from the official paper; see the solution

Which of the following statements correctly describe the return values of the fork() system call in a Unix-like operating system?

  1. A.

    0 to the child process and a positive value (child’s PID) to the parent process

  2. B.

    1 to the child process and 0 to the parent process

  3. C.

    A negative value if the fork fails

  4. D.

    Both “0 to the child process and a positive value (child’s PID) to the parent process” and “A negative value if the fork fails”

  5. E.

    None of the above

Attempted by 49 students.

Sign up free to check your answer

Sign up free

Explore the full course: Ibps So It Mains

Loading lesson…