I have a question with this pointer value assignment:
*p++ = *q++;
According to Operator Priority Table
The priorities of operators are "++" > "*" > "=".
But the result of the above statement does the assignment "=" first, as the following
*p = *q;
p++;
q++;
Why?
The post-increment operator increments its operand after its value has already been computed. The pointer dereference therefore occurs on the values the pointers held before this line. However, the precedence you give is correct; the expression is indeed equivalent to
(*(p++)) = (*(q++))