File: operator.7

package info (click to toggle)
manpages 6.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,184 kB
  • sloc: sh: 575; python: 222; perl: 190; makefile: 29; lisp: 22
file content (44 lines) | stat: -rw-r--r-- 1,122 bytes parent folder | download | duplicates (3)
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
'\" t
.\" Copyright 1989-1993, The Regents of the University of California.
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.TH operator 7 2025-05-17 "Linux man-pages (unreleased)"
.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