1
Answer

problem to use carets for swap of two number

Photo of Sandeep Banerjee

Sandeep Banerjee

10y
1.1k
1
a^=b
b^=a
a^=b
 
is this code work in c# for swap of two numbers. if yes what is the logic behind this i know it is OR operator but i thought that it is use only with bool function.

Answers (1)