GATE Computer Science (CS) 2016 Shift 1 Solved Paper
© examsiri.com
Question : 46 of 65
Marks:
+1,
-0
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a=3;
void n(x) {x = x * a; print (x) ; }
void m(y) {a = 1; a = y - a; n (a); print (a) ; }
void main() { m(a); }
a=3;
void n(x) {x = x * a; print (x) ; }
void m(y) {a = 1; a = y - a; n (a); print (a) ; }
void main() { m(a); }
Go to Question: