Indirection operator with post-increment operator:
#include
int main(void)
{
int aiData[5] = {100,200,30,40,50};
int *piData = aiData;
*piData++;
printf("aiData[0] = %d, aiData[1] = %d, *piData = %d", aiData[0], aiData[1], *piData);
return 0;
}
Output: 100, 200, 200
Explanation:
In the above example, two operators are involved and both have different precedence. The precedence of post ++ is higher than the *, so first post ++ will be executed and above expression, *p++ will be equivalent to *(p++). In another word you can say that it is post-increment of address and output is 100, 200, 200.