blob: 047041e8d1308a14c20c35f149dcfe1a47672c2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
'\" t
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\" @(#)operator.7 8.1 (Berkeley) 6/9/93
.\"
.\" Copied shamelessly from FreeBSD with minor changes. 2003-05-21
.\" Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
.\"
.\" Restored automatic formatting from FreeBSD. 2003-08-24
.\" Martin Schulze <joey@infodrom.org>
.\"
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
.TH operator 7 2023-10-31 "Linux man-pages 6.7"
.SH NAME
operator \- C operator precedence and order of evaluation
.SH DESCRIPTION
This manual page lists C operators and their precedence in evaluation.
.P
.TS
lb lb lb
l l l.
Operator Associativity Notes
[] () . \-> ++ \-\- left to right [1]
++ \-\- & * + \- \[ti] ! sizeof right to left [2]
(type) right to left
* / % left to right
+ \- left to right
<< >> left to right
< > <= >= left to right
== != left to right
& left to right
\[ha] left to right
| left to right
&& left to right
|| left to right
?: right to left
= *= /= %= += \-= <<= >>= &= \[ha]= |= right to left
, left to right
.TE
.P
The following notes provide further information to the above table:
.P
.PD 0
.IP [1] 5
The ++ and \-\- operators at this precedence level are
the postfix flavors of the operators.
.IP [2]
The ++ and \-\- operators at this precedence level are
the prefix flavors of the operators.
.PD
|