/* * C99 has support of variable arguments in macros statement * (called variadic macro) just like variable argument function, Macros also * can be of variable number of augments * This program illustrate variadic macros */ #include <stdio.h> /* * Simple Macro definition * which allows to print whatever the way you want * in Macro definition "..." indicates variadic macro, OP() definition is * mixture of named args and variable number of aguments, it is possible * to have macro of complete variable number of args * like DISPLAY in below example */ #define OP(format, exp, ...) printf(format, exp, ##__VA_ARGS__) #define DISPLAY(...) printf(__VA_ARGS__) int main() { int a=3, b=4, c=5; OP("%s %d\n", "Result after add", a+b); OP("%s %d %s %d\n", "Result after add", a+b+c, "Result after sub", a-b); OP("%s\n", "This is tes...