So here is the question in my book, I have to tell the output.
#include <stdio.h>
#define prod(x) (x*x)
int main() {
int i=3,j,k,l;
j=prod(i+1);
k=prod(i++);
l=prod(++i);
printf("i=%d\tj=%d\tk=%d\tl=%d",i,j,k,l);
return 0;
}
The answer is in book is :
i=7 j=7 k=9 l=49
I get the part why i=7 and j=7 but how is k=9 and l=49.
Also when i run in visual studio community i get the same output but when i run it on an online compiler i get
i=7 j=7 k=12 l=49
Can someone tell me why is this happening?