Open In App

GATE | GATE CS 1999 | Question 38

Like Article
Like
Save
Share
Report

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


Last Updated : 09 Oct, 2017
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads