OPERATORS IN C

1) Arithmetic Operators

 

Assume variable A holds 10 and variable B holds 20.

 

 

 

2) Relational Operators

 

Assume variable A holds 10 and variable B holds 20

 

 

3) Logical Operators

 

Assume variable A holds 1 and variable B holds 0 (A and B can be expressions with relational operators also)

 

 

 

Be careful about the double symbols in case of AND and OR

&& and || allow multiple expressions to be combined

4) Bit-wise Operators

 

Assume variable A holds 60 and variable B holds 13.

 

 

5) Assignment Operators