Advertisement Remove all ads

Advertisement Remove all ads

Advertisement Remove all ads

Short Note

What are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.

Advertisement Remove all ads

#### Solution

**Arithmetic operators:** perform simple arithmetic operations like addition, subtraction, multiplication, division, etc.

**Unary Operators:**

- Require only one operand.
- Example: +, -, *, /, %, >, <, <=, AND, OR

**Binary Operators:**

- Require two operands
- Example: ++ (Plus, Plus) Increment operator, – – (Minus, Minus) Decrement operator, NOT, ~,

Concept: Lexical Units (Tokens)

Is there an error in this question or solution?