Pregunta de entrevista de Tata Consultancy Services

how to swap two variables without using third.

Respuesta de la entrevista

Anónimo

11 de abr de 2019

int x = 10; int y = 5; x = x + y ; 15 y = x - y ; 15- 5 = 10 x = x- y ; 15 - 10 = 5