当前位置:网站首页>Introduction to C language -- summary table of operator priority sorting
Introduction to C language -- summary table of operator priority sorting
2022-07-26 07:12:00 【Code_ tassels】
Preview tips : This article is a summary table of operator priority , It is suitable for introductory learning and middle and late learning , Recommended collection !
√ Quick query :Ctrl + F key , Enter keywords , You can quickly query the operators you want to know .
* reminder : The smaller the priority number , The higher the priority .
priority | Operator | Name or meaning | Use form | Combination direction | explain |
1 | [] | The array subscript | Array name [ Constant expression ] | Left to right | nothing |
() | parentheses | ( expression )/ Function name ( Formal parameter table ) | nothing | ||
. | Member selection ( object ) | object . Member name | nothing | ||
-> | Member selection ( The pointer ) | Object pointer -> Member name | nothing | ||
2 | - | Negative operator | - expression | Right to left | Monocular operator |
~ | Bitwise negation operator | ~ expression | |||
++ | Self - increment operator | ++ Variable name / Variable name ++ | |||
-- | Self - subtracting operator | -- Variable name / Variable name -- | |||
* | Value operators | * Pointer to the variable | |||
& | Fetch address operator | & Variable name | |||
! | Logical nonoperator | ! expression | |||
( type ) | Cast | ( data type ) expression | nothing | ||
sizeof | Length operator | sizeof( expression ) | nothing | ||
3 | / | except | expression / expression | Left to right | Binocular operator |
* | ride | expression * expression | |||
% | remainder ( modulus ) | Integer expression % Integer expression | |||
4 | + | Add | expression + expression | Left to right | Binocular operator |
- | reduce | expression - expression | |||
5 | << | Move left | Variable << expression | Left to right | Binocular operator |
>> | Move right | Variable >> expression | |||
6 | > | Greater than | expression > expression | Left to right | Binocular operator |
>= | Greater than or equal to | expression >= expression | |||
< | Less than | expression < expression | |||
<= | Less than or equal to | expression <= expression | |||
7 | == | be equal to | expression == expression | Left to right | Binocular operator |
!= | It's not equal to | expression != expression | |||
8 | & | Bitwise AND | expression & expression | Left to right | Binocular operator |
9 | ^ | Bitwise XOR | expression ^ expression | Left to right | Binocular operator |
10 | | | Press bit or | expression | expression | Left to right | Binocular operator |
11 | && | Logic and | expression && expression | Left to right | Binocular operator |
12 | || | Logic or | expression || expression | Left to right | Binocular operator |
13 | ?: | Conditional operator | expression 1? expression 2: expression 3 | Right to left | Ternary operator |
14 | = | Assignment operator | Variable = expression | Right to left | |
/= | Assign value after division | Variable /= expression | nothing | ||
*= | Multiply and assign | Variable *= expression | nothing | ||
%= | Assign a value after taking the module | Variable %= expression | nothing | ||
+= | Add and assign | Variable += expression | nothing | ||
-= | Value after subtraction | Variable -= expression | nothing | ||
<<= | Left shift assignment | Variable <<= expression | nothing | ||
>>= | Right shift after assignment | Variable >>= expression | nothing | ||
&= | Bitwise and post assignment | Variable &= expression | nothing | ||
^= | Assign a value after bitwise XOR | Variable ^= expression | nothing | ||
|= | Assign value by bit or after | Variable |= expression | nothing | ||
15 | , | The comma operator | expression , expression ,… | Left to right | nothing |
√ Additional explanation : It should be noted that for Same priority Operator , The operation order is determined by Combination direction Determined by .
2022.7.16 Sort out the records :Code_ tassels (CSDN)
If it helps everyone , I hope you can praise more + Focus on ! In this way, I will be more motivated ! ღ( ´・ᴗ・` ) finger heart .
* attach : For the convenience of preservation , Provide self-made picture version , You can pay attention to the following “ In the words, the flowers bloom and the ink marks ”, reply key word " Operator ", Free access to " Operator priority sorting summary table " HD watermark free original .
边栏推荐
- [Star Project] small hat aircraft War (III)
- Common programming shortcut keys of idea (take off after learning the operation)
- WPS or office compression of ppt
- QT listens for socket events and uses qsocketnotifier class
- "XXXX" is running, which may cause the system to jam, reduce the standby time, and click Close "
- AcWing-每日一题
- Acwing- daily question
- Yolov6 target detection practice: training your own data set (video tutorial)
- [QT] detailed explanation of *.pro, *.pri, *.prf, *.prl files
- File server fastdfs
猜你喜欢

Yolov6 target detection practice: training your own data set (video tutorial)

The results of the soft test can be checked, and the entry to query the results of the soft test has been opened in the first half of 2022

404 page best practices to improve user experience

Opencv learning warp Perspective

怎样在win10家庭版中使用Hyper-V

你了解MySQL都包含哪些“零件“吗?

Image annotation software reference

Rectification ideas for the previous article

On the difference between Eval and assert

Solve the problem that Chrome browser is tampered with by drug bullies
随机推荐
RGB-T追踪——【数据集基准】GTOT / RGBT210 / RGBT234 / VOT-2019-2020 / LasHeR / VTUAV
[romance understood by technical talents] tidb community has prepared a gift for your partner for the "Tanabata Festival". Reply: if I want to challenge, I can participate in the activity!
Business secret series -- Talking about the evaluation of commercial passwords from the perspective of Party A and Party B (I)
Why can't extern compile variables decorated with const?
MySQL intent lock
Weekly tip 142: multi parameter constructors and explicit
"XXXX" is running, which may cause the system to jam, reduce the standby time, and click Close "
Queue assistant | product update log in June 2022
WPS or office compression of ppt
MySQL read / write lock
Heap parsing and heap sorting
Idea -- use @slf4j to print logs
Basic operations and common functions of MySQL table creation
[hardware ten treasures] - 7.1 [dynamic RAM] key points of DDR hardware design
Rgb-t tracking - [dataset benchmark] gtot / rgbt210 / rgbt234 / vot-2019-2020 / laser / VTUAV
HCIP --- MPLS技术
Curl post request on the server, using postman tool for parameter conversion
The results of the soft test can be checked, and the entry to query the results of the soft test has been opened in the first half of 2022
Kubernetes scheduling concept and workflow
[749. Isolate virus]