Pps u1 Lesson Operators in c Part-1 (1)
Pps u1 Lesson Operators in c Part-1 (1)
S IN C
Operator :
An operator is a symbol that tells the computer to perform certain
mathematical or logical manipulations. Operators are used in programs to
manipulate data and variables.
Example : +,-,> etc.
Operation :
The process of computation that happens in an expression based on
operator.
Example : Addition, subtraction, greater than etc.
Operand :
The data items involved in an operation or the data on which operands act
to produce result is known as operand.
Example : Addition, subtraction, greater than etc.
FIG : ILLUSTRATTION OF OPERATOR,OPERAND,OPERATION
OPERATION
ADDITION
c = a + b;
OPERANDS OPERATOR
TYPES OF OPERATORS
1.Arithmetic Operators
2.Relational Operators
3.Logical Operators
4.Assignment Operators
5.Increment and Decrement operators
6.Conditional operators
7.Bitwise Operators
8.Special operators
1.Arithmetic Operators
C provides all the 5 basic arithmetic operators.
An arithmetic operator performs mathematical operations such as addition,
subtraction, multiplication, division etc on numerical values.
+ Addition c=a+5;a=b+c;h=9+6;
- Subtraction d=e-f;
* Multiplication k=3*g;
Real Arithmetic:
If both the operands in an arithmetic expression are real operands then it
is known as real arithmetic and the result is real.
Logical Not :
It is TRUE if the Expression evaluates to FALSE
Example :