GATE | GATE CS 1999 | Question 38

Consider the following program in a language that has dynamic seeping.

var x: real;
procedure show:
    begin print(x);end;
procedure small;
    var x: real;
        begin x: = 0.125; show; end;
begin x:=0.25
    show; small
    end.

Then the output of the program is:
(A) 0.125 0.125
(B) 0.25 0.25
(C) 0.25 0.125
(D) 0.125 0.25


Answer: (C)

Explanation:

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

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.