Operators in C:
Operators are sign which performs some operation on operands.
Categories of operators:
1.Unary
It takes single operand.
2.Binary
It takes two operands.
3.Ternary
It takes three operands.
4.Bitnary
It takes more than 3 operands.
Types of operators in C
1.Arithmetic operators
(- unary ,+,*,%,/ all binary)
2.Releational operators(binary)
(>,<,>=,<=,==,!=)
All relational operators compare 2 values and return boolean value.
3.Logical operators
&& AND operator (binary)
OR operator (binary)
! NOT operator (unary)
4.Increment/Decrement operator
++X or --x prefix
X++or x--postfix
5.Assignment operator
=, +=, -=, /=, *=(shorthand assignment operator)
= (Bitwise assign operator)
6.Conditional operators (Ternary)
?:
(- unary ,+,*,%,/ all binary)
2.Releational operators(binary)
(>,<,>=,<=,==,!=)
All relational operators compare 2 values and return boolean value.
3.Logical operators
&& AND operator (binary)
OR operator (binary)
! NOT operator (unary)
4.Increment/Decrement operator
++X or --x prefix
X++or x--postfix
5.Assignment operator
=, +=, -=, /=, *=(shorthand assignment operator)
= (Bitwise assign operator)
6.Conditional operators (Ternary)
?: