Pergunta de entrevista da empresa Tata Consultancy Services

how to swap two variables without using third.

Resposta da entrevista

Sigiloso

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