2 votes 2 votes P(X:integer,Y:integer) { X = 6; A = 8; return ( X + Y ) } if the function P were invoked by the following program fragment. k = 1; L = 1; Z = (K, L); Then the value of Z would be? where X=call by reference and Y=pass by value Programming in C programming parameter-passing + – Nishikant kumar asked Nov 16, 2015 • edited Nov 16, 2015 by Pragy Agarwal Nishikant kumar 1.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Since k is passed by ref so k and x will be pointing to same memory loc.while y which is passed by value has value of l . Y= 1. Now in p function, x or k = 6. And y remains same . Y= 1. Therefore z = (6 + 1) = 7 7 Swati Bhandari answered May 26, 2016 Swati Bhandari comment Share Follow See all 0 reply Please log in or register to add a comment.