int a=20, b=30;

// before swapping values are a= 20 and b=30

a = a+b ; // now a = 50 and b= 30

b = a-b; // now a = 50 and b = 20

a = a-b; // now a = 30 and b= 20

// after swapping values are a= 30 and b = 20

11,704,107 members (64,478 online)

Email

Password

Sign in using