C++/C operator Table

Source: Internet
Author: User
Tags bitwise

Operators decrease in priority from top to bottom, and operators in the same row have the same precedence. The second line is all unary operators.


Operator Explain How to combine
() []- >. left-to-right
! ~ + +--+- 

* & ( ) sizeof

negation, bitwise negation, Increment, decrement, sign,

Indirect, take address, type convert, size

from right to left /span>
* / % Multiply, divide, take the mold From left to right
+ - Add, Subtract From left to right
<< >> Move left, move right From left to right
< <= >= > Less than, equal to, greater than or equal to, greater than From left to right
== != Equal to, not equal to From left to right
& Bitwise-AND From left to right
^ Bitwise XOR OR From left to right
| Bitwise OR From left to right
&& Logic and From left to right
|| Logical OR From left to right
? : Conditions From right to left
= += -= *= /=

&= ^= |= <<= >>=

Various assignment values From right to left
, Comma (order) From left to right



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

C++/C operator Table

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.