The precedence of C-language operators is cured by C grammar, and the precedence of operators is naturally obtained by grammatical interdependencies.
Therefore, familiarity with C-grammar, to understand the C operator precedence, is more advanced than the rote priority table, and can answer beginner's doubts: Why is the priority order? More importantly, it is possible to know how the C-language "compound" expression is combined with operations.
In addition, only Ricky's C language book mentions C grammar, the other C language books are not mentioned, come up is "must" "should" remember the hard instructions! In fact, familiar with the C grammar, these priority problems are no longer a problem!
According to the expression of C99, in order to facilitate understanding, organized into the following production conversion diagram, which contains the operator priority at a glance!
Image view big picture way: Way 1: Right-click Save! Way 2: Open the image in the new tab (Chrome has this feature)!
Note: The only difference between C99 and C89 in the expression grammar is that there are two new production (type-name) {initialized columns} in C99 's Postfix exp generation, and the rest of the operators are no different from the original design of Ricky!
C-language operator precedence