In C language, operators are symbols that are used to perform operations on data. C operators can be classified into several categories, including arithmetic operators, logical operators, bitwise operators, assignment operators, and conditional operators. Here are some examples of commonly used operators in C:
- Arithmetic Operators:
Arithmetic operators are used to perform arithmetic operations on numeric values.
Operator | Description | Example |
+ | Addition | a + b |
– | Subtraction | a – b |
* | Multiplication | a * b |
/ | Division | a / b |
% | Modulo (remainder) | a % b |
For example: