Re: [algogeeks] Fwd: why we can not swap values using macro?

2011-10-10 Thread rahul sharma
macros i thnik cant swap pointers..i have doubt for same it is test ur c skil question On Sun, Oct 9, 2011 at 10:08 PM, sunny agrawal sunny816.i...@gmail.comwrote: because you have not made any call to swap values of x and y I Don't know what you are trying to do here if you want to swap

Re: [algogeeks] Fwd: why we can not swap values using macro?

2011-10-10 Thread sunny agrawal
Macros can Swap Pointers. and That is what the above code is doing. On Mon, Oct 10, 2011 at 5:52 PM, rahul sharma rahul23111...@gmail.comwrote: macros i thnik cant swap pointers..i have doubt for same it is test ur c skil question On Sun, Oct 9, 2011 at 10:08 PM, sunny agrawal

[algogeeks] Fwd: why we can not swap values using macro?

2011-10-09 Thread Rajesh Kumar
-- Forwarded message -- From: Rajesh Kumar testalgori...@gmail.com Date: Sun, Oct 9, 2011 at 2:58 PM Subject: why we can not swap values using macro? To: algogeeks@googlegroups.com why this code doesn't swap values of x and y? #includestdio.h #define swap(a,b,c) c t;t=a,a=b,b=t;

Re: [algogeeks] Fwd: why we can not swap values using macro?

2011-10-09 Thread sunny agrawal
because you have not made any call to swap values of x and y I Don't know what you are trying to do here if you want to swap values why are you not calling macro swap(x,y,int) you are making a macro call to swap pointers and you can check that pointer will get swapped. On Sun, Oct 9, 2011 at