Here\'s the code:
#include #include #define VAL1(a,b) a*b #define VAL2(a,b) a/b #define VAL3(a,b) ++a%b int main() {
If you really think it is necessary to use such macros, you'll need to use parenthesis () to avoid side-effects:
()
#define VAL1(a,b) ((a)*(b)) #define VAL2(a,b) ((a)/(b)) #define VAL3(a,b) ((++a)%(b))