+ 1

Try to develop a snippet to swap two numbers without using third variable and must use single statement .

28th Aug 2017, 5:47 PM
Pooja Murugesan
Pooja Murugesan - avatar
3 ответов
+ 5
in python 3 a,b = b,a
28th Aug 2017, 6:13 PM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 3
x86 asm: xchg eax, edx
28th Aug 2017, 8:52 PM
aklex
aklex - avatar
+ 1
c : a^=b^=a^=b;
29th Aug 2017, 2:21 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar