# C Operators

### C Programming Operators

An operator is a symbol that instructs C to perform some operation, or action, on one or more operands. An operand is something that an operator acts on. In C, all operands are expressions. C operators fall into several categories:

1) The assignment operator.

2) Mathematical operators.

3) Relational operators.

4) Logical operators.

### The assignment operator

The assignment operator is the equal sign (=). Its use in programming is somewhat different from its use in regular math.If you write ….

``x = y;``

in a C program, it doesn’t mean “x is equal to y.” Instead, it means “assign the value of y to x.” In a C assignment statement, the right side can be any expression, and the left side must be a variable name.

### Mathematical operators

C’s mathematical operators perform mathematical operations such as addition and subtraction. C has two unary mathematical operators and five binary mathematical operators.

``````The Unary Mathematical Operators
Increment ++ Increments the operand by one ++x, x++
Decrement -- Decrements the operand by one --x, x--``````
``````  The binary mathematical operators
Subtraction - Subtracts the second x - y operand from the first operand
Multiplication * Multiplies two operands x * y
Division / Divides the first operand x / y by the second operand
Modulus % Gives the remainder x % y when the first operand is divided by
the second operand``````

### The Relational Operators

C’s relational operators are used to compare expressions, asking questions such as, “Is x greater than 100?” or “Is y equal to 0?”An expression containing a relational operator evaluates to either true (1) or false (0). C’s six relational operators …..