How many times is the digit 3 printed by the following program? main() {…

How many times is the digit 3 printed by the following program?

main()
{
    printf("1"); fork();
    printf("2"); fork();
    fork(); printf("3");
}
  1. A.

    16

  2. B.

    8

  3. C.

    4

  4. D.

    2

Attempted by 387 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…