C operators can be classified into following types,

  • Arithmetic operators
  • Relation operators
  • Logical operators
  • Bitwise operators
  • Assignment operators
  • Conditional operators
  • Special operators

Arithmetic operators

+ adds two operands

- subtract second operands from first

* multiply two operand

/ divide numerator by denumerator

% remainder of division

++ Increment operator increases integer value by one

-- Decrement operator decreases integer value by one

 

Relation operators

== Check if two operand are equal

!= Check if two operand are not equal.

> Check if operand on the left is greater than operand on the right

< Check operand on the left is smaller than right operand

>= check left operand is greater than or equal to right operand

<= Check if operand on left is smaller than or equal to right operand

 

Logical operators

&&  Logical AND 

|| Logical OR

! Logical NOT

 

Bitwise operators


&    Bitwise AND

|    Bitwise OR

^    Bitwise exclusive OR

<<    left shift

>>    right shift
 

Assignment Operators

=    assigns values from right side 
    operands to left side operand

+=    adds right operand to the left 
    operand and assign the result to left

-=    subtracts right operand from the left 
    operand and assign the result to left operand    

*=    mutiply left operand with the right operand
    and assign the result to left operand    

/=    divides left operand with the right operand
    and assign the result to left operand    

%=    calculate modulus using two operands 
    and assign the result to left operand

Conditional operator

sizeof    Returns the size of an variable
&          Returns the address of an variable
*           Pointer to a variable