Posts

Showing posts from March 4, 2011

Swapping of two numbers without arithmatic operator without temporary variable

#include<stdio.h> void swap(int *a,int *b) {      *a^=*b^=*a^=*b;  }  int main()  {      int a=10,b=20;      swap(&a,&b);      printf("%d %d",a,b);      getch();      return(0);  }