i hope you mistakenly split the preprocessor statements in multiple lines without using \
what i mean, you typed
#define swap(a,b)
a=a+b;b=a-b;a=a-b;
instead of
#define swap(a,b) \
a=a+b;b=a-b;a=a-b;
output is x and y are swapped... why swapped?
due to preprocessor just simply replace what you need
then your code look like as
void main()
{
int x=5,y=10;
x=x+y;
y=x-y;
x=x-y;
printf("%d,%d",x,y);
}
therefore output is 10,5