Gate2001_2.17

What is printed by the print statements in the program P1 assuming call by reference parameter passing?

Program P1()
{
x=10;
y=3;
func1(y,x,x);
print x;
print y;
}
func1(x,y,z)
{
y=y+4;
z=x+y+z;
}

 

(a) 10, 3
(b) 31, 3
(c) 27, 7
(d) None of the above

 

Answer

Discuss

0Comment