// C语言参数化宏 // -----------------------------#include stdio.h#define MAX(x,y) ((x) (y) ? (x) : (y))
编程学习网为您整理以下代码实例,主要实现:C语言参数化宏,希望可以帮到各位朋友。
// C语言参数化宏
// -----------------------------
#include <stdio.h>
#define MAX(x,y) ((x) > (y) ? (x) : (y))
int main(voID) {
printf("Max between 20 and 10 is %d\n", MAX(10, 20));
return 0;
}