Table 2.1 summarizes the rules for precedence and associativity of all operators, including those that we have not yet discussed. Operators on the same line have the same precedence; rows are in order of decreasing precedence, so, for example, *, /, and % all have the same precedence, which is higher than that of binary + and -. The ``operator''() refers to function call. The operators -> and . are used to access members of structures; they will be covered in Chapter6, along with sizeof (size of an object). Chapter5 discusses * (indirection through a pointer) and & (address of an object), and Chapter 3 discusses the comma operator.
Unary & +, -, and * have higher precedence than the binary forms.
The End!
阅读(1156) | 评论(0) | 转发(0) |