Pregunta de entrevista de Intel Corporation

How can you exchange the value of two variables without using a third variable?

Respuestas de entrevistas

Anónimo

22 mar 2011

x = x + y y = x - y x = x - y

9

Anónimo

6 abr 2015

int Val1 = 5; int Val2 = 10; Val1 ^= Val2; Val2 ^= Val1; Val1 ^= Val2;