Consider the following program snippet. Assume that the program compiles and…

GATE · 2026 · CS · Set 1 · Computer Science & IT

Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always successful in creating a process.

image.png

The total number of times that the printf statement gets executed is ________. (answer in integer)

Attempted by 93 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…