《c程序设计语言》读书笔记-4.14-定义宏交换两个参数
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#define swap(t,x,y) { t _z;\
_z = y;\
y = x;\
x = _z; }
int main()
{
int a = 0,b = 1;
swap(int,a,b);
printf("%d %d\n",a,b);
return 0;
}

浙公网安备 33010602011771号