Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE CS 1999 | Question 63
  • Last Updated : 09 Oct, 2017

[5 Marks question]

What will be the output of the following program assuming that parameter passing is

(i) call by value

(ii) call by reference

(iii) call by copy restore

procedure P{x, y, z};
    begin y:y+1; z: x+x end; 
begin
    a:= b:= 3;
    P(a+b, a, a);
    Print(a) 
end.


Answer:

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :