Hello, I am trying some program and confused with the output of the program
#include<stdio.h>
#define a(x) (x*x)
int main()
{
int i=3,j;
j=a(i+1);
printf("%d",j);
return 0;
}
I want to know why the program is not giving the output 16(as instead to that i an getting the output 7 for the above program )
i understood the point very much but if the program like this
#include<stdio.h>
#define a(x) (x*x)
int main()
{
int i=3 ,j,k;
j=a(i++);
k=a(++i);
printf("%d\n%d",j,k);
return 0;
}
then why the above program would give output 9 and 49....
plz help