
Swap 2 integers without using 3rd integer

AnswerBot
1y

Swap 2 integers without using 3rd integer
Use XOR operator
Addition and subtraction can also be used
Bitwise operations can be used
Anonymous
12mo

1
Anonymous
10mo

a=a+b
b=a-b
a=a-b

Help your peers!
Add answer anonymously...
Top Nihilent Software Engineer Trainee interview questions & answers
Popular interview questions of Software Engineer Trainee
Top HR questions asked in Nihilent Software Engineer Trainee
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app