The following C program main() { fork() ; fork() ; printf ("yes"); } If we…

ISRO Scientist/Engineer SC 2018

The following C program

main()
{
    fork() ; fork() ; printf ("yes");
}

If we execute this core segment, how many times the string yes will be printed ?

  1. A.

    Only once

  2. B.

    2 times

  3. C.

    4 times

  4. D.

    8 times

Attempted by 1122 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…