Priority and combination of operators in C language programming

Source: Internet
Author: User
Priority and combination of the C Operator

Priority

Operator

Description

Number of involved objects

Integration direction

1

()
[]
->
.

Parentheses
Subscript operator
Point to struct member operators
Struct member operators

Binary Operators
Binary Operators
Binary Operators

From left to right

2

!
~
++
--
-
(Type)
*
&
Sizeof

Logical non-Operator
Bitwise Inverse Operator
Auto-increment operator
Auto-subtraction Operator
Negative Operator
Type conversion Operator
Pointer Operator
Bitwise operators
Evaluate the type length Operator

Single Object Operator

From right to left

3

*
/
%

multiplication operator
division operator
remainder operator

binary operators

/ TD>

from left to right

4

+
-

addition operator
subtraction operator

binary operators

/ TD>

from left to right

5


shift left operator
shift right operator

binary operators

/ TD>

from left to right

6


<=

>=

Relational operators

/ TD>

binary operators

/ TD>

from left to right

7

=< SPAN lang =" En-us ">
! =

equality operators
unequal operators

binary operators

/ TD>

from left to right

8

&

bitwise AND operator

binary operators

/ TD>

from left to right

9

^

bitwise XOR or operator

binary operators

/ TD>

from left to right

10

|

bitwise OR operator

binary operators

/ TD>

from left to right

11

&

/ TD>

logic and operators

binary operators

/ TD>

from left to right

12

||

/ TD>

logical or operator

binary operators

/ TD>

from left to right

13

?:

conditional operators

/ TD>

three-object operator

/ TD>

from right to left

14

=
+ =
-=
* =
/=
%=
>>=
<=
& =
^=
|=

Value assignment operator

Binary Operators

from right to left

15

,

Comma Operator
(Sequence evaluate operator)

From left to right

Ref:

Http://blog.csdn.net/awpatp/archive/2007/11/28/1905374.aspx

Http://www2.tust.edu.cn/jingpin/jp2006/claguage/starark/ArticleShow.asp? ArticleID = 174

Http://www.edujy.com/c/basic/p3-2.htm

Http://www.et-dz.com/plus/view.php? Aid = 3800.

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.