What does the following code do? var a, b : integer; begin a:=a+b; b:=a-b;…
GATE · 1993 · CS · Question 7 subparts
What does the following code do?
var a, b : integer;
begin
a:=a+b;
b:=a-b;
a:=a-b
end;
- A.
exchanges a and b
- B.
doubles a and stores in b
- C.
doubles b and stores in a
- D.
leaves a and b unchanged
- E.
none of the above
Attempted by 160 students.
Sign up free to check your answer
Sign up freeLoading lesson…