C Operator Summary

Source: Internet
Author: User
Tags bitwise operators

Arithmetic operators

Plus minus +- from left to right +- sibling

Multiplication modulus *%/ from left to right above +-

Self-added + + +-- right binding higher than basic arithmetic operator

Positive and negative -+ from right to left with + +-- sibling

Assignment operators

Assignment = from right to left lower than arithmetic, relationship, logic

Relational operators

All left binding is lower than arithmetic higher than the value of the assignment

<, <=, >, >= have the same priority, higher than = =, ! =. = = and ! = siblings.

logical operators

&&| | left binding less than relationship higher than assignment short-circuit characteristic

! right binding is higher than arithmetic

Bitwise operators

The number of participating bit operations appears in a complementary fashion.

~ Right associative sign bit also reversed

<< left high discard right low 0

>> sign bit move, positive high 0, negative depends on compilation system

Conditional operators

?: from right to left lower than relationship and arithmetic, above assignment type can be different, take higher

Comma operator

, from left to right below the value of an assignment comma expression value equal to the expression n

C Operator Summary

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.