Electronic Circuits - Electronic Tutorials - Electronic Hobby Projects - A Complete Electronic Resource Centre

C Language Programming Library Reference Guide

Products

Sitemap

Online
Calculators

Circuits (A-C)

Circuits (D-O)

Circuits (P-Z)

Tutorials


 
Google
 
Web Hobbyprojects.com

Operators - Precedence

The operators have a set order of precedence during evaluation. Items encapsulated in parenthesis are evaluated first and have the highest precedence. The following chart shows the order of precedence with the items at the top having highest precedence.

 

Operator Name
! Logical NOT. Bang.
++ -- Increment and decrement operators.
* / % Multiplicative operators.
+ - Additive operators.
<< >> Shift operators.
< > <= >= Inequality comparators.
== != Equality comparators
& Bitwise AND.
^ Bitwise XOR.
| Bitwise OR.
&& Logical AND.
|| Logical OR.
?: Conditional.
= op= Assignment.

Examples:

17 * 5 + !(1+1) && 0
Evaluates to 0 (false).
5+7<4
Evaluates to 1 (true).
a<b<c
Same as (a<b)<c.
Search
Custom Search

<<<  Back to C Language Library Reference Guide

<<<  Back to Electronics Tutorials