Consider the following program fragment:
var a,b : integer;
procedure G(c,d: integer);
begin
c:=c-d;
d:=c+d;
c:=d-c
end;
a:=2;
b:=3;
G(a,b);
If both parameters to $G$ are passed by reference, what are the values of $a$ and $b$ at the end of the above program fragment ?
- $a=0$ and $b=2$
- $a=3$ and $b=2$
- $a=2$ and $b=3$
- $a=1$ and $b=5$
- None of the above