...
GATE 1995
March 2, 2024
OOPS
March 2, 2024
GATE 1995
March 2, 2024
OOPS
March 2, 2024

APPSC-2012-DL-CS

Question 5
What is the output of the following Pascal program segment?

{c: array [1..10] of integer;

m, n, temp : integer;

procedure r (k, j : integer)

begin

k :=k+1; j :=j+2;

end r;

m :5; n := 3;

r(m, n)

temp;=m; m:=n; n:temp;

write m, n;

}

A
3, 5
B
5, 3
C
Either 3, 5 or 5, 3
D
Unpredictable
E
Answer the above question with explanation
Correct Answer: E

Leave a Reply

Your email address will not be published. Required fields are marked *