This is a simple question that how to swap two values let say a and b without using third variable. But this question gets confusing when you are asked to swap negative and positive value together.
Let say a=2
Now swap a value into b and b value into a.
So the code will be:-
The good part about this code is that you can enter any value in a or b whether negative or positive it will swap it with ease.