Consider the block of code given below:
Program PARAM(input,output);
var m,n:integer;
procedure P(var x,y:integer);
var m:integer;
begin
m:=1;
x:=y+1;
end;
procedure Q(x:integer; var y:integer);
begin
x:=y+1;
end;
begin
m:=0; P(m,m);write(m);
n=0; Q(n*1,n);write(n)
end;
30. The value of m, output by the program PARAM is
a)1, because m is a local variable in P
b)0, because m is the actual parameter that corresponds to the formal parameter in P
c) 0, because both x and y are just reference to m and y has the value 0
d)1, because both x and y are just references to m which gets modified in procedure p
31. The value of n, output by the program PARAM is
a)0, because n is the actual parameter corresponding to x in procedure Q
b)0, because n is the actual parameter to y in procedure Q
c)1, because n is the actual parameter corresponding to x in procedure Q
d)1, because n is the actual parameter corresponding to y in procedure Q
e)None of the above
32. What is the scope of m declared in the main program?
a)PARAM,P,Q
b)PARAM,P
c)PARAM,Q
d)P,Q