Editor choice

# Operators in C Programming Language

## C operators

C operators are symbols that are used to perform mathematical or logical manipulations. The C programming language is rich with built-in operators. Operators take part in a program for manipulating data and variables and form a part of the mathematical or logical expressions.

### Types of Operator in C

```C Programming Language offers various types Of Operators having different functional capabilities.
1. Arithmetic Operators
2. Relational Operators
3. Logical Operators
4. Assignment Operators
5. Increment and Decrement Operators
6. Conditional Operator
7. Bitwise Operators
8. Special Operators```

### Arithmetic Operators

Arithmetic Operators are used to performing mathematical calculations like addition (+), subtraction (-), multiplication (*), division (/) and modulus (%).

### Increment and Decrement Operators.

Increment and Decrement Operators are useful operators generally used to minimize the calculation, i.e. ++x and x++ means x=x+1 or -x and x−−means x=x-1. But there is a slight difference between ++ or −− written before or after the operand. Applying the pre-increment first add one to the operand and then the result is assigned to the variable on the left whereas post-increment first assigns the value to the variable on the left and then increment the operand.

### Relational operators

Relational operators are used to comparing two quantities or values.

### Logical Operators

C provides three logical operators when we test more than one condition to make decisions. These are: && (meaning logical AND), || (meaning logical OR) and ! (meaning logical NOT).

### Bitwise Operators

C provides a special operator for bit operation between two variables.

### Assignment Operators

Assignment operators applied to assign the result of an expression to a variable. C has a collection of shorthand assignment operators.

### Conditional Operators

C offers a ternary operator which is the conditional operator (?: in combination) to construct conditional expressions

### Special operators

C supports some special operators.

We will be happy to hear your thoughts Hello!👋