I have a question about macros in c, Here is my code!
#include <stdio.h>
#define product(x) (x*x)
int main(){
int i=3,j;
j = product(i+1);
printf("%d",j);
}
i guessed the answer as 16 but answer is 7, How is it possible?
#include <stdio.h>
#define product(x) (x*x*x)
int main(){
int i=3,j;
j = product(i+1);
printf("%d",j);
}
answer of this is 10