Tag: size operation has no increment operator precedence nbsp ext font New
1. Understanding the self-increment decrement operator
(1) post-increment-decrement operator precedence > pre-increment decrement operator.
(2) The pre-increment-decrement operator "variable is first self-decrement and then used".
(3) The post-increment-decrement operator "variable is first used for re-increment self-decrement".
2. The * operator and the pre-increment-decrement operator are all 3-level operators, but the predecessor-increment-decrement operator takes precedence over the * operator.
The post-increment-decrement operator is a level 2 operator. The smaller the progression, the higher the priority.
3. Following this rule, you can understand: if int a=100,*p=&a;
(1) *p++: The post-increment operator takes precedence, first using p, that is, pointing to a first, and then p pointing to the next inner deposit cell. No difference from * (p++).
Parentheses indicate that the operator takes precedence, and then the increment operator takes precedence over *, so the parentheses are superfluous.
(2) (*p) + + indicates that P points to an element plus 1.
(3) * (++P) Here P first add 1, then take the element that P points at this time.
C + +: The difference between (*p) + + and * (p++) and *p++