static void Main(string[] args)
{
int a = 2;
int b = 3;
Console.WriteLine("Before Swapping Value of a= " + a.ToString());
Console.WriteLine("Before Swapping Value of b= " + b.ToString());
Console.WriteLine();
a = a ^ b;
b = a ^ b;
a = a ^ b;
Console.WriteLine("After Swapping Value of a= " + a.ToString());
Console.WriteLine("After Swapping Value of b= " + b.ToString());
Console.ReadLine();
}
Comments
Post a Comment