C# Program to swap the two numbers using Bitwise XOR Operation. Given two variables, x and y, swap two variables with using a XOR statements.
Input: 300 400 Output: 400 300 Explanation: x = 300 y = 400 x = 400 y = 300
Enter two numbers Numbers before swapping x = 300 b = 400 Numbers after swapping x = 400 b = 300
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.