1、
#include <stdio.h> #define swap(type, x, y) type tmp = x; x = y; y = tmp; int main(void) { int x = 10, y = 5; swap(int, x, y); printf("x = %d ", x); printf("y = %d ", y); return 0; }