Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   macro (http://www.go4expert.com/forums/macro-t6340/)

anilk501 13Sep2007 09:35

macro
 
1) write generic swap macro used to swap data b/w any type: swap 2 int ,float or char etc.

listendinesh 13Sep2007 11:37

Re: macro
 
You can do it without temp var.
Code:

#define SWAP(a,b)  a=a+b;b=a-b;a=a-b;


All times are GMT +5.5. The time now is 03:10.