How to analyse the precedence in following situation .
for (i=0; i<20; i++)
{
*array_p++ = i*i;
printf(\"%d\\n\",*arr++);
}
how
Operators ++ and * have the same precedence (postfix or prefix
).However the associativity in such cases is from right to left.
so in cases like
*ptr++ ==> *(ptr++)
*++ptr ==> *(++ptr)
++*ptr ==> ++(*ptr)
this link should give you more information on operators precedence and their associativity.. http://www.isthe.com/chongo/tech/comp/c/c-precedence.html