*#include<stdio.h>*
*int main()*
*{*
*int i=10;*
*int j=20;*
*int *a,*b;*
*a =&i;*
*b=&j;*
*printf("before""%d%d\n",*a,*b);*
**a^=*b;*
**b^=*a;*
**a^=*b;*
*printf("after""%d%d",*a,*b);*
*return 0;*
*}*
*
*
*This swaps pointers .... *

On Sun, Jul 31, 2011 at 7:15 PM, Nikhil Gupta <[email protected]>wrote:

> How to swap two pointers without using a temporary pointer ?
>
> --
> Nikhil Gupta
> Senior Co-ordinator, Publicity
> CSI, NSIT Students' Branch
> NSIT, New Delhi, India
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards
Rajeev N B <http://www.opensourcemania.co.cc>

"*Winners Don't do Different things , they do things Differently"*

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to