yes it is possible

the deal is swapping

use pointers
or
just
copy
temp=a;
a=b;
b=temp;// temp is temporary variable