Arithmetic operators are used to perform basic mathematical operations like addition, subtraction, multiplication and division. There are five arithmetic operators available in C (
The table below lists the arithmetic operators+, -, *, /, %). All arithmetic operators are binary operators, ie; they operate on two operands to produce the result.| Operator | Name | Description | Example |
|---|---|---|---|
| + | Addition Operator | '+' Operator adds two values. This operator works on integer, float and character variables. | 20 + 10return 20 |
| - | Subtraction Operator | '-' Operator produces a result after subtracting two values. It also works on integer, float, character variables. | 20 - 10returns 10 |
| * | Multiplication Operator | '*' Operator produces result after multiplication of operands. | 20 * 10returns 200 |
| / | Division Operator | '/' Operator produces result of division of first operand by second. | 20 / 10returns 2 |
| & | Modulus Operator | '%' Operator generates the remainder after integer division. | 25 % 10returns 5 |