Name: Anonymous 2012-06-14 1:13
#include <stdio.h>
#define swap(T,x,y) ({T tmp = (x); (x) = (y); (y) = tmp;})
int main() {
int x = 2, y = 5;
swap(int, x, y);
printf("x = %d, y = %d", x, y); //x = 5, y = 2
return 0;
}Is this bad practice?