Código: macros.c


Descarga aquí

#include <stdio.h>

#define swap(x,y) {int tmp = x; x = y; y = tmp;}

int main()
{
   int x = 10;
   int y = 20;
   printf("x = %d\n",x);
   printf("y = %d\n",y);
   swap(x,y);
   printf("x = %d\n",x);
   printf("y = %d\n",y);
}