ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://pvs-studio.com/en/blog/terms/0064/ |
| Last Crawled | 2026-04-06 22:53:25 (12 hours ago) |
| First Indexed | 2021-04-27 22:30:05 (4 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Operator precedence in C and C++ |
| Meta Description | Any language expression consists of operands (variables, constants, etc.) connected with each other by operators. Operations are executed in a strict order. The value that determines a privilege to execute a certain operation is called precedence. The operation execution order can be regulated by use of parentheses. |
| Meta Canonical | null |
| Boilerpipe Text | Jul 19 2021
Any language expression consists of operands (variables, constants, etc.) connected with each other by operators. Operations are executed in a strict order. The value that determines a privilege to execute a certain operation is called precedence. The operation execution order can be regulated by use of parentheses.
Table 1. Operation precedence in C/C++.
You may often see errors in programs which are caused by the fact that it is easy for programmers to forget the exact priorities of operations (
article on the topic
). This is why professional developers do not feel embarrassed about using additional parentheses: this method secures them from accidental mistakes, and makes expressions more readable.
Note.
The PVS-Studio analyzer provides several diagnostics such as
V648
. These diagnostics help detect errors related to operator precedence.
Try
to check your code.
References
Wikipedia.
Operators in C and C++
.
Cppreference.
C++ Operator Precedence
.
0
0 |
| Markdown | 

Our [website uses cookies](https://pvs-studio.com/en/privacy-policy/) to enhance your browsing experience.
Accept

Webinar: Let's make a programming language. Lexer - 29.04
[Registration](https://pvs-studio.com/en/webinar/)
- [Support](https://pvs-studio.com/en/about-feedback/)
- En
- English
- Français
- 
- [Authorization](https://pvs-studio.com/login/?next=/en/blog/terms/0064/)
- [Registration](https://pvs-studio.com/login/?register=true&next=/en/blog/terms/0064/)
[](https://pvs-studio.com/en/)
- [Analyzer](https://pvs-studio.com/en/pvs-studio/) Analyzer
- [About PVS-Studio](https://pvs-studio.com/en/pvs-studio/)
- [Download PVS-Studio](https://pvs-studio.com/en/pvs-studio/download/)
- [What's new in 7.41](https://pvs-studio.com/en/whatsnew/)
- [FAQ](https://pvs-studio.com/en/pvs-studio/faq/)
- [SAST (CWE, OWASP, MISRA)](https://pvs-studio.com/en/pvs-studio/sast/)
- [Online Examples](https://pvs-studio.com/en/pvs-studio/examples/)
- [Documentation](https://pvs-studio.com/en/docs/) Documentation
- [General documentation](https://pvs-studio.com/en/docs/)
- [Warnings](https://pvs-studio.com/en/docs/warnings/)
- [License](https://pvs-studio.com/en/order/) License
- [Purchase a license](https://pvs-studio.com/en/order/)
- [Choose a license](https://pvs-studio.com/en/order/license/)
- [For clients](https://pvs-studio.com/en/for-clients/)
- [For students](https://pvs-studio.com/en/order/for-students/)
- [For Open Source](https://pvs-studio.com/en/order/open-source-license/)
- [For Microsoft MVPs](https://pvs-studio.com/en/order/mvp/)
- [Blog](https://pvs-studio.com/en/blog/posts/) Blog
- [Blog](https://pvs-studio.com/en/blog/posts/)
- [Video](https://pvs-studio.com/en/blog/video/)
- [Books](https://pvs-studio.com/en/blog/books/)
- [Entertainment](https://pvs-studio.com/en/blog/quest/)
- [Events](https://pvs-studio.com/en/blog/events/)
- [Checked projects](https://pvs-studio.com/en/blog/inspections/)
- [Error examples](https://pvs-studio.com/en/blog/examples/)
- [Terminology](https://pvs-studio.com/en/blog/terms/)
- [64-bit Lessons](https://pvs-studio.com/en/blog/lessons/)
- [About us](https://pvs-studio.com/en/about/) About us
- [History](https://pvs-studio.com/en/about/)
- [Customers](https://pvs-studio.com/en/about/customers/)
- [Careers](https://pvs-studio.com/en/about/careers/)
- [Contacts](https://pvs-studio.com/en/address/)
- [\+7(903)844-02-22](tel:+7\(903\)844-02-22)
\+7(903)844-02-22
- [Try for free](https://pvs-studio.com/en/pvs-studio/try-free/)
- #### Analyzer
- [About PVS-Studio](https://pvs-studio.com/en/pvs-studio/)
- [Download PVS-Studio](https://pvs-studio.com/en/pvs-studio/download/)
- [What's new in 7.41](https://pvs-studio.com/en/whatsnew/)
- [FAQ](https://pvs-studio.com/en/pvs-studio/faq/)
- [SAST (CWE, OWASP, MISRA)](https://pvs-studio.com/en/pvs-studio/sast/)
- [Online Examples](https://pvs-studio.com/en/pvs-studio/examples/)
- #### Documentation
- [General documentation](https://pvs-studio.com/en/docs/)
- [Warnings](https://pvs-studio.com/en/docs/warnings/)
- #### License
- [Purchase a license](https://pvs-studio.com/en/order/)
- [Choose a license](https://pvs-studio.com/en/order/license/)
- [For clients](https://pvs-studio.com/en/for-clients/)
- [For students](https://pvs-studio.com/en/order/for-students/)
- [For Open Source](https://pvs-studio.com/en/order/open-source-license/)
- [For Microsoft MVPs](https://pvs-studio.com/en/order/mvp/)
- #### Blog
- [Blog](https://pvs-studio.com/en/blog/posts/)
- [Video](https://pvs-studio.com/en/blog/video/)
- [Books](https://pvs-studio.com/en/blog/books/)
- [Entertainment](https://pvs-studio.com/en/blog/quest/)
- [Events](https://pvs-studio.com/en/blog/events/)
- [Checked projects](https://pvs-studio.com/en/blog/inspections/)
- [Error examples](https://pvs-studio.com/en/blog/examples/)
- [Terminology](https://pvs-studio.com/en/blog/terms/)
- [64-bit Lessons](https://pvs-studio.com/en/blog/lessons/)
- #### About us
- [History](https://pvs-studio.com/en/about/)
- [Customers](https://pvs-studio.com/en/about/customers/)
- [Careers](https://pvs-studio.com/en/about/careers/)
- [Contacts](https://pvs-studio.com/en/address/)
- #### Personal account
- [Authorization](https://pvs-studio.com/login/?next=/en/blog/terms/0064/)
- [Registration](https://auth.pvs-studio.com/en/register/)
- #### Language
- English
- Français
[Support](https://pvs-studio.com/en/about-feedback/) [Try for free](https://pvs-studio.com/en/pvs-studio/try-free/)
[Home](https://pvs-studio.com/en/)
\>
[Posts](https://pvs-studio.com/en/blog/posts/)
\>
[Terminology](https://pvs-studio.com/en/blog/terms/)
\>
Operator precedence in C and C++
Jul 19 2021
# Operator precedence in C and C++
Jul 19 2021
Any language expression consists of operands (variables, constants, etc.) connected with each other by operators. Operations are executed in a strict order. The value that determines a privilege to execute a certain operation is called precedence. The operation execution order can be regulated by use of parentheses.

Table 1. Operation precedence in C/C++.
You may often see errors in programs which are caused by the fact that it is easy for programmers to forget the exact priorities of operations ([article on the topic](https://pvs-studio.com/en/blog/posts/cpp/a0072/)). This is why professional developers do not feel embarrassed about using additional parentheses: this method secures them from accidental mistakes, and makes expressions more readable.
**Note.** The PVS-Studio analyzer provides several diagnostics such as [V648](https://pvs-studio.com/en/docs/warnings/v648/). These diagnostics help detect errors related to operator precedence. [Try](https://pvs-studio.com/en/pvs-studio/try-free/?utm_source=website&utm_medium=pvs&utm_campaign=manual&utm_content=Priority) to check your code.
## References
- Wikipedia. [Operators in C and C++](https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B).
- Cppreference. [C++ Operator Precedence](https://en.cppreference.com/w/cpp/language/operator_precedence).
 
 
0
0
0
[SHARE](https://www.reddit.com/submit?url=https://pvs-studio.com%2Fen%2Fblog%2Fterms%2F0064%2F&title=Operator%20precedence%20in%20C%20and%20C++)
Popular related articles
- [Code whisperers and rubber duck sorcery: do developers have superstitions? Date: Jul 03 2024 Author: Polina Alekseeva Bugs, bugs, bugs... There's so much in that word, and there are just so many of them. It's merely enough to freak anyone out or develop a phobia. And no wonder; you never know when a regular error in…](https://pvs-studio.com/en/blog/posts/1139/)
- [Compilation of gripping C++ conference talks from 2023 Date: May 02 2024 Author: Uliana Khromchenko A new conference season is on its way, so we'd like to invite you to read some of the best C++ talks from the last season. You can learn more about C++ and get inspired in this compilation of the...](https://pvs-studio.com/en/blog/posts/1120/)
- [Bugs that buzzed a lot Date: Apr 12 2024 Author: Anastasiya Vorobeva A real bug, a bug in the code, or distractions can all affect your project and lead to many different consequences. In this article, we've collected a number of notorious and fascinating bugs. Let's.…](https://pvs-studio.com/en/blog/posts/1114/)
- [Don't fix anything — cultivate acceptance instead: bugs in games that have become features Date: Mar 15 2024 Author: Mariya Hlopova Many psychologists recommend cultivating acceptance. That is, accepting one's mistakes, for example. Some game developers have taken this quite seriously. They decided, "Why not?" and made errors...](https://pvs-studio.com/en/blog/posts/1108/)
- [PVS-Studio in 2023 Date: Jan 12 2024 Author: Gleb Aslamov It's January 2024, so it's time to look back on 2023. In this article, we will not only discuss all the new features that have appeared in 2023, but also go over the main functions of the PVS-Studio.…](https://pvs-studio.com/en/blog/posts/1096/)
## Want to try PVS‑Studio for free?
[Get free trial](https://pvs-studio.com/en/pvs-studio/try-free/)
### Achievements
- [Blog](https://pvs-studio.com/en/blog/posts/)
- [Checked projects](https://pvs-studio.com/en/blog/inspections/)
- [Detected errors](https://pvs-studio.com/en/blog/examples/)
- [Customers](https://pvs-studio.com/en/about/customers/)
- [Early access program](https://pvs-studio.com/en/pvs-studio-eap/)
### PVS-Studio
- [About PVS-Studio](https://pvs-studio.com/en/pvs-studio/)
- [Download](https://pvs-studio.com/en/pvs-studio/download/)
- [Request a trial key](https://pvs-studio.com/en/for-clients/)
- [Documentation](https://pvs-studio.com/en/docs/)
- [Online Examples](https://pvs-studio.com/en/pvs-studio/examples/)
- [Troubleshooting](https://pvs-studio.com/en/docs/manual/0029/)
### Licensing
- [Purchase a license](https://pvs-studio.com/en/order/)
- [Choose a license](https://pvs-studio.com/en/order/license/)
- [For clients](https://pvs-studio.com/en/for-clients/)
- [For students](https://pvs-studio.com/en/order/for-students/)
- [For Open Source](https://pvs-studio.com/en/order/open-source-license/)
- [For Microsoft MVP](https://pvs-studio.com/en/order/mvp/)
### Company
- [About us](https://pvs-studio.com/en/about/)
- [Jobs](https://pvs-studio.com/en/about/careers/)
- [Contacts](https://pvs-studio.com/en/address/)
- [Feedback](https://pvs-studio.com/en/about-feedback/)
- [Subscribe to newsletter](https://pvs-studio.com/en/subscribe/)
Contact us for technical information
or other questions
[Contact us](https://pvs-studio.com/en/about-feedback/)
[](https://x.com/pvs_studio)
[](https://www.linkedin.com/company/pvs-studio/)
[](https://feedly.com/i/subscription/feed%2Fhttps%3A%2F%2Fpvs-studio.com%2Fen%2Fb%2Frss%2F)
[](https://www.youtube.com/c/PVSStudio_channel/)
[](https://habr.com/en/company/pvs-studio/blog/)
Contact us for technical information
or other questions
[Contact us](https://pvs-studio.com/en/about-feedback/)

[Sitemap](https://pvs-studio.com/en/sitemap/)
[Terms of use](https://pvs-studio.com/en/terms-of-use/)
©2008 - 2026, PVS‑Studio LLC |
| Readable Markdown | Jul 19 2021
Any language expression consists of operands (variables, constants, etc.) connected with each other by operators. Operations are executed in a strict order. The value that determines a privilege to execute a certain operation is called precedence. The operation execution order can be regulated by use of parentheses.

Table 1. Operation precedence in C/C++.
You may often see errors in programs which are caused by the fact that it is easy for programmers to forget the exact priorities of operations ([article on the topic](https://pvs-studio.com/en/blog/posts/cpp/a0072/)). This is why professional developers do not feel embarrassed about using additional parentheses: this method secures them from accidental mistakes, and makes expressions more readable.
**Note.** The PVS-Studio analyzer provides several diagnostics such as [V648](https://pvs-studio.com/en/docs/warnings/v648/). These diagnostics help detect errors related to operator precedence. [Try](https://pvs-studio.com/en/pvs-studio/try-free/?utm_source=website&utm_medium=pvs&utm_campaign=manual&utm_content=Priority) to check your code.
## References
- Wikipedia. [Operators in C and C++](https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B).
- Cppreference. [C++ Operator Precedence](https://en.cppreference.com/w/cpp/language/operator_precedence).
 
 
0
0 |
| Shard | 198 (laksa) |
| Root Hash | 14184891999980795398 |
| Unparsed URL | com,pvs-studio!/en/blog/terms/0064/ s443 |