Operator in C
Operator most important part of program. Because its used mathematics functions and also use ordinary printf and scanf functions. Operators are execute with 1 or more operands. Some operator use single operand and some operator use 2 operands.
Operators has different types. It has 8 different types of operator.
- Arithmetic operator
- Relational operator
- Logical operator
- Assignment operator
- Shorthand operator
- Bit wise operator
- Conditional operator
- Comma operator
Arithmetic operator:
Arithmetic operators are take 2 or more numerical operands and give one numerical value as result. Arithmetic operators are addition(+), subtraction(-), division(/) and multiplication(*).
Relational operator:
Relational operator are used to compare two operands and return either or one. Relational operators are less than (<) , greater than (>), less than or equal to (<=), greater than or equal to (>=).
Logical operator:
Logical operator are used with boolean value and return boolean result. Logical operators are AND (&&) , OR (||), NOT(!).
Post a Comment