
Asked in TCS
Write code to swap two numbers without using a third variable.

AnswerBot
1y
Swapping two numbers without using a third variable in code
Use bitwise XOR operation to swap two numbers without using a third variable
Example: a = 5, b = 7. a = a XOR b, b = a XOR b, a = a XOR b
Ensur...read more
Help your peers!
Add answer anonymously...
Top System Engineer Interview Questions Asked at TCS
Q. How do you handle frames in Selenium?
Q. What synchronization methods have you used in Selenium?
Q. What is Java?
Interview Questions Asked to System Engineer at Other Companies
Top Skill-Based Questions for TCS System Engineer
Networking Interview Questions and Answers
250 Questions
Java Interview Questions and Answers
250 Questions
Algorithms Interview Questions and Answers
250 Questions
Data Structures Interview Questions and Answers
250 Questions
Operating Systems Interview Questions and Answers
250 Questions
Python Interview Questions and Answers
200 Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

