Problems using define
in C. Works well when I call OP(9)
, but when I call OP(7+2)
I get 23. Why?
#include<stdio.h>
#include<stdlib.h>
#define OP(x) x*x;
int main() {
int x,y;
x = 2;
y = OP(7+2);
printf("%d", y);
return 0;
}
Why prints 23 and not 81?