#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. (I'm getting the output 7.)
I understood the point very much but if the program is 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 does the above program give the following output:
9
49