Anonymous user menu

Gate2005_72

Consider the following code fragment:

if (fork () ==0)
{ 
a = a + 5; printf(“%d,%d\n”, a, &a); 
}
else 
{
 a = a –5; printf(“%d, %d\n”, a, &a);
}

Let u, v be the values printed by the parent process, and x,y be the values printed by the child process. Which one of the following is TRUE?
(a) u = x + 10 and n = y
(b) u = x + 10 and v is \(\ne\) y
(c) u + 10 = x and n = y
(d) u + 10 = x and v \(\ne\) y

Answer

Discuss

1Comment
Jayesh Malviya @thatsjm4u
1 Oct 2017 02:29 pm

c