the minimum number of temporary variables needed to swap the contents of two variables is
Answers
Answered by
0
two variables are need to swap the contents
Answered by
4
The minimum number of temporary variables needed to swap the contents of two variable is Zero (0)
As, In variables a ,b
a=a+b;
b=a-b;
a=a-b;
or
a=a×b;
b=a÷b;
a=a÷b;
So, no temporary variables is needed
As, In variables a ,b
a=a+b;
b=a-b;
a=a-b;
or
a=a×b;
b=a÷b;
a=a÷b;
So, no temporary variables is needed
Similar questions
Computer Science,
8 months ago
Art,
8 months ago
Social Sciences,
1 year ago
Math,
1 year ago
Physics,
1 year ago
Science,
1 year ago