First Method a=a+b; b=a-b; a=a-b; Second Method a=a*b; b=a/b; a=a/b; Third Method a=a^b; b=a^b; a=a^b;
another thing i would like to add in this post i.e, Swappin using Pointer! just declare a function before void main() and follow the codes! Code: void swap(int*,int*); void main() { [i]Program Statement[/i] } void swap(int *i,int *j) int k; k=*i; *i=*j; *j=k; printf("%d %d",*i,*j); }