Consider the following code segment : main(){ fork(); printf(“Hello”); fork();…

Consider the following code segment :
main(){
fork();
printf(“Hello”);
fork();
printf(“Good”);
fork();
printf(“Day”);
}
Let X be the number of times “Hello” printed, Y be the no of times “Good” printed and Z will be the number of times “Day” printed then X+Y+Z = ___________

Attempted by 115 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…