How to analyse the precedence in following situation .
for (i=0; i<20; i++)
{
*array_p++ = i*i;
printf(\"%d\\n\",*arr++);
}
how
It is easy to remember which has precedence when you consider prefix increment.
what has precedence here?
*++array = x; // pretty obvious
the same precedence rules go for the postfix expression so its rather easy.
The same goes for the cast operator.
(somestruct *)x + 1;
first the cast is done since if it wasn't the following wouldnt make sense
x + (int)1;