Thread: Some problems
View Single Post
  #4 (permalink)  
Old April 11th, 2008, 03:42 PM
c.vikramnarayan c.vikramnarayan is offline
Registered User
 
Join Date: Apr 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

int main()
{
 int a=321,b=258;
 cout << "Before swaping: a=" << a << " b=" << b << endl;
//Using bitwise ex-or operation
 b^a^b^a;
 cout << "After Swaping: a=" << a << " b=" << b << endl;
 return 0;
}

Vikki
Reply With Quote