operator(7)
๐ NAME ๐
okay so bestie, welcome to operator(7) โ this one lives in the Miscellaneous Information Manual (section 7, the vibes section ๐
), and it's literally just:
operator โ C operator precedence and order of evaluation ๐ธ
That's it. That's the whole assignment. It's a cheat sheet, and it slays.
๐ DESCRIPTION ๐
so this page just lays out all the C operators and tells you who goes first when the compiler has to figure out what you meant. precedence + associativity = the group chat hierarchy of operators, no cap. ๐ฅ
Here's the ranking, from "I get a say before everyone" down to "I go last, unfortunately":
() _Generic()โ Associativity:-โ Notes: [1][] () . -> ++ -- (type){}โ Associativity: left to right โ Notes: [2] [3]++ -- & * + - ~ ! _Countof sizeof alignof _Maxof _Minofโ Associativity: right to left โ Notes: [4](type)โ Associativity: right to left* / %โ Associativity: left to right+ -โ Associativity: left to right<< >>โ Associativity: left to right< > <= >=โ Associativity: left to right== !=โ Associativity: left to right&โ Associativity: left to right^โ Associativity: left to right|โ Associativity: left to right&&โ Associativity: left to right||โ Associativity: left to right?:โ Associativity: right to left= *= /= %= += -= <<= >>= &= ^= |=โ Associativity: right to left,โ Associativity: left to right
๐ Top of the list = highest precedence. Bottom = lowest. Read it like a leaderboard, because that's exactly what it is. โจ
๐ the notes, bestie ๐
the following notes provide further information to the above table ๐ซถ:
- [1] The
()at this precedence is the parenthesized expression. - [2] The
()at this precedence is the function call operator. - [3] The
++and--operators at this precedence level are the postfix flavors of the operators. - [4] The
++and--operators at this precedence level are the prefix flavors of the operators.
๐ not the same two symbols showing up in different rows doing completely different jobs.()is out here with main character energy in two separate spots, and++ --did it too. iykyk.
and that's the whole page!! go forth and parenthesize when you're unsure, because precedence is a liar sometimes ๐ญ ๐ฆ
this delightful little dispatch came to you from Linux man-pages 6.20, dated 2025-12-01 โ mwah, periodt ๐๐โจ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: BSD-3-Clause
- Copyright 1989-1993, The Regents of the University of California
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms