operators in c programming | All In One Tuts

Operators in C Programming

An operator is a symbol that tell the computer to perform certain mathematical or logical manipulations. Operators are used in programs to manipulate data and variables. They usually form a part of the mathematical of logical expressions.

C-Operator Precedence :

 

Operator

Description

Associatively

( )

Parenthesis

Left to Right

[ ]

Bracket

Left to Right

.

Member selection via object name

Left to Right

->

Member selection via pointer

Left to Right

+ +  —

Postfix increment /Decrement

Left to Right

+ +  —

Prefix increment / Decrement

Right to Left

+   –

Unary plus / minus

Right to Left

!   ~

Logical negation /bitwise complement

Right to Left

(Type)

Cast (change type)

Right to Left

*

Dereference

Right to Left

&

Address

Right to Left

Size of

Determine size in bytes

Right to Left

* / %

Multiplication / Division /Modulus

Left to Right

+  –

Addition / subtraction

Left to Right

<< >>

Bitwise shift left, shift right.

Left to Right

< < =

Relational less than I less than or equal

Left to Right

> > =

Relational greater mm / greater then or equal

Left to Right

= =  ! =

Relational equal / not equal to

Left to Right

&

Bitwise AND

Left to Right

^

Bitwise exclusive OR

Left to Right

|

Bitwise inclusive OR

Left to Right

&&

Logical AND

Left to Right

! !

Logical OR

Left to Right

? ::

Ternary condition

Left to Right

=

Assignment

Left to Right

+ =  – =

Addition / subtraction assignment

Left to Right

* = / =

Multiplication / division assignment

Left to Right

%= & =

Modulus / bitwise AND assignment

Left to Right

^ =  \ =

Bitwise exclusive / inclusive OR assignment

Left to Right

<< = >> =

Bitwise shift left / right assignment

Left to Right

Hello Viewers,
welcome to the Allinonetuts a Technical tutorial and Programming Blog Maintained by Vikas Kardam, a Web Developer and Blogger From Delhi, India.
Operators in C Programming was last modified: April 19th, 2017 by Vikas Kardam

Leave a Reply

Your email address will not be published. Required fields are marked *