Contact: aviboots(AT)netvision.net.il
41,243 questions
53,750 answers
573 users
#include <stdio.h> #define SWAP(a, b) ((&(a) == &(b)) || \ (((a) -= (b)), ((b) += (a)), ((a) = (b) - (a)))) int main(void) { int x = 8290, y = 1000; SWAP(x, y); printf("x = %d y = %d\n", x, y); return 0; } /* run: x = 1000 y = 8290 */