001、
#include <stdio.h> #define diff(x, y) (x - y) ## 函数式宏, diff函数中的参数,将按照 (x -y)在函数中展开 int main(void) { int a, b; double m, n; printf("a = "); scanf("%d", &a); printf("b = "); scanf("%d", &b); printf("m = "); scanf("%lf", &m); printf("n = "); scanf("%lf", &n); printf("int: %d\n", diff(a, b)); printf("double: %f\n", diff(m, n)); return 0; }