Gate1999_2.13

Consider the following program in a language that has dynamic scooping:

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

Discuss

0Comment