Operator


An operator is a symbol that specifies the operation to be performed on various types of operands.
Operands:-
operand may be a constant or variable or function which return a value.
Operators:-
An operator may be associated with one or two or three operands.
Example:- a + b
                   a - b
                   a * b
 Note:- In these expressions the identifiers 'a' and 'b' are operands and the symbols + - * are operators

Types of Operators

Arithmetic Operators+, - , *
Assignment Operators= , +=
Increment/Decrement Operators++ , --
Relational Operators< , >= , > ,<=
Logical Operators&& , ||, !,
Conditional Operators?:
Bitwise Operators& , ^
Special Operators,

Address operator(&)

An address-of operator is a mechanism to obtain the address of a variable is called address operator and it is denoted by the symbol &(ampersand).

Example:-
int a=56; 1000

Two bytes of memory space is reserved for the variable a starting from the address 1000 and the integer data 56 is stored in memory as :-

printf(“value of a=%d”,a);
// output value of a =56.

printf(“value of a=%d”,&a);
// output: address of a =56.

Here, '&a' is the address operator ampersand.