Explain the two ways to swap the values of two variable of same data types
Answers
Answered by
0
using three variables
or only using two variables
1.
a=b
b=c
c=a
2.
a=a+b
b=a-b
a=a-b
or only using two variables
1.
a=b
b=c
c=a
2.
a=a+b
b=a-b
a=a-b
Similar questions