Hi guys,
I was working on macros and I am curious abt the result of the sample program below. The result (Product) of the program is 7, I was expecting 16. If I change the code to Product(x) then it wrks fine. I wanted to know wt happens if the argument to the macros is Product(x+1). Please help!!!!!!
#include<stdio.h>
#define PRODUCT(x) (x*x)
int main(void)
{
int i=6,j;
j=PRODUCT(i+1); //Dono how it is processed???
printf("Product=%d\n",j);
return 0;
}