Answer:
#include<iostream>
using namespace std;
int main()
{int num1,num2;
cout<<"enter 2 numbers:"<<endl;
cinn>>num1;
cinn>>num2;
cout<<("value without swapping of num1",num1);
cout<<("value without swapping of num2",num2);
num1 ^= num2;
num2 ^= num1;
num1 ^= num2;
cout<<("num1 after swapping",num1);
cout<<("num2 after swapping,num2);
return 0;
}