Symbols that are used to perform some operations in a C program are called Operators.
Operators are categorized as:-
- Unary Operator(Uses One Operand)
- Secondary Operator(Uses Two Operands)
- Ternary Operator (Uses Three Operands)
Type Of Operators In C :-
Ignore Comma, Comma itself an Operator
- Arithmetic Operators (Exp:- +, -, *, /,% )
- Relational Operators (Exp:- >, >=, <=,<, ==, =!)
- Logical Operators (Exp:- &&, || , ! )
- Assignment Operators (Exp:- = )
- Bit Wise Operators (Exp:- &, |, ^, ~ )
- Size Of Operator (Exp:- sizeof() )
- Comma Operator (Exp:- , )
- Inc and Dec Operator (Exp:- ++, -- )
- Conditional Operators (Exp:- condition?true:false )
- Address Operator (Exp:- &(reference operator ) )
- De-reference Operator (Exp:- * )
Many more are there that will discuss in coming posts.
Frequently Ask Questions In Interview :-
- Tell us 5 Unary Operators.
- Example of Ternary operator. (You should take a situation ; then explain)