Domanda di colloquio di Tata Consultancy Services

how to swap two variables without using third.

Risposta di colloquio

Anonimo

11 apr 2019

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