Question d’entretien chez Cvent

Swap two integers without using any extra memory.

Réponses aux questions d'entretien

Utilisateur anonyme

29 août 2017

Take 2 variable a and b Then take values from user or you can give values to a and b like a=20 b=30 Then a=a+b b=a-b a=a-b Now a=30 b=20

Utilisateur anonyme

13 sept. 2017

Take two variables a and b than take two values from user or we can also give the values of these like , a = 10; b = 20; then a = a * b; b = a / b; a = a/ b; Now the output is a = 20; b = 10;