2. C/C++ Operators
• C language supports a rich set of built-in
operators.
• An operator is a symbol that tells the compiler
to perform certain mathematical or logical
manipulations.
• Operators are used in program to manipulate
data and variables.
Copyrights By Tanveer Malik
3. C/C++ Operators
• C operators can be classified into following types.
1. Arithmetic Operators
2. Relational Operators
3. Logical Operators
4. Bitwise Operators
5. Assignment Operators (Will Discuses in Next
Chap No.3)
6. Misc Operators
Copyrights By Tanveer Malik
4. Arithmetic Operators
• The following table shows all the arithmetic
operators supported by the C language.
• Assume variable (A) holds value (10) and
variable (B) holds value (20)
Then:
Copyrights By Tanveer Malik
6. Relational Operators
• The following table shows all the arithmetic
operators supported by the C language.
• Assume variable (A) holds value (10) and
variable (B) holds value (20)
Then:
Copyrights By Tanveer Malik
8. Logical Operators
• Following table shows all the logical operators
supported by C language.
• Assume variable (A) holds value (1) and
variable (B) holds value (0)
Then:
Copyrights By Tanveer Malik