C - Operators

An operator is a symbol that tells the compiler to perform some specific mathematical or logical calculation. C - Language is rich in built-in operators and provides the following types of operators.

S.No.Operator NameOperator Symbol
1. Arithmetic Operators
+ Addition
- Subtraction
/ Division
* Multiplication
% Modulus
2. Comparison/Relational Operators
> Greater than
< Less than
>= Greater than equals to
<= Less than equals to
!= Not equals to
== Equals to
3. Logical Operators
&& And
|| Or
! Not
4. Assignment Operator
= Assignment
5. Compound Assignment Operators
+= Add and Assignment
−= Subtract and Assignment
*= Multiply and Assignment
/= Divide and Assignment
%= Modules and Assignment
&=   |=   <<=   >>=   ^=
6. sizeof() operator calculate the size of the data type
7. Conditional or Ternary Operator
? :
8. Increment/Decrement Operator
a++ Post Increment
++a Pre Increment
a-- Post Decrement
--a Pre Decrement
9. Bitwise Operators
& And
| Or
<< Left Shift
>> Right Shift
^ Exclusive OR
10. Other Operators
, comma
. dot
-> arrow operator
& addressof
* Dereference
() Parentheses (function call)
[] Brackets (array subscript)