Define Macro PRINT to print given integer argument in C | C preprocessor programs
As we have discussed in the last post (how to use printf in function like macro?) that we can use printf() in Macros.
Here, we have to define a Macro that will accept an argument and print it by using printf() function.
Macro definition:
#define PRINT(val) (printf("value is: %d\n",val))
Example:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer