0

What does the operator " ^ " (without the " " ) do?

Somewhere in SoloLearn, I found that you can swap two values without using a third variable in this way: a^=b; b^=a; a^=b; So, what is this operator ( ^ ) called? What does " ^ " basically do and how does it swap the values?

14th Oct 2017, 2:43 PM
1604064_Sharif
1604064_Sharif - avatar
1 Resposta
0
kurwis, is there a general way to prove that this method works for swapping any two values?
14th Oct 2017, 3:31 PM
1604064_Sharif
1604064_Sharif - avatar