Output of the following code is:
3
2 2 5
I couldn't understand why ((*p)++)+(++(*p))
won't increase a[0] twice. Please help.
Thanks in advance.
#include <cstdio>
int a[2]={1,5};
int main()
{
int *p;
p=a;
printf("%d\n",((*p)++)+(++(*p)));
printf("%d %d %d\n",*p,a[0],a[1]);
return 0;
}