School of Computer Sciences and Engineering Department of Computer Science and Application

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

School of Computer Sciences and Engineering

Department of Computer Science and Application


CIA-3 PRESENTATION
ON
“TOPIC :OPERATORS IN C PROGRAMMING ”
BY
MS. KASHAF SHAIKH
FYBSC.CS AIML&VR-A3
PRN NO-240105311065
ACADEMIC YEAR:2024-25
What is C Operators ?

 The symbols which are used to perform logical and


mathematical operations in a C program are called C
operators.
 These C Operators join individual constants and variables
to form expressions.
 These operators are used in program to manipulate data
and variables.
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
Arithmetic Operators

Arithmetic operators are used to perform mathematical


calculations like addition, subtraction, multiplication,
division and modulus.
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
Relational operators
Relational operators are used to compare two quantities and take
certain decision depending on their relation.
If the specified relation is true it returns one.
If the specified relation is false it returns zero.
< Is less than
<= Is less than or equal to
> Is greater than
>= Is greater than or equal to
== Is equal to
!= Is not equal to
Logical Operators

Logical operators are used for testing more than one


condition and making decisions.
C has three logical operators they are:
&& Logical AND
|| Logical OR
! Logical NOT
Assignment operators

These operators are used for assigning the result of an


expression to a variable.
Operators:
==, +=, -=, *=, /=, %=,
>>=, <<=, &=, |=, ^=
Increment and decrement operators

These operators are increase or decrease the value of


the variable by one.
Operators: ++ and --
The operator ++ adds one to the operand
The operator -- subtracts one from the operand
Both are unary operators and can be used as pre or post
increment/decrement.
Conditional operators

These conditional operator are used to construct


conditional expressions of the form.
Syntax:
exp1? exp2: exp3.
where exp1,exp2,exp3 are expressions.
Operator:
?:(ternary operator)
Bitwise operators
These operators are used to perform bit operations.Decimal
values are converted into binary values which are the
sequence of bits and bitwise operators work on these bits.
Following are bitwise operator :
1. & Bitwise AND
2. | Bitwise OR
3. ~ Bitwise NOT
4. ^ XOR
5. << Left shift
6. >> Right shift
Conclusion

Operators are the building blocks of any programming


language, enabling developers to perform a wide
range of operations, from simple arithmetic to
complex bitwise manipulations.
Thank you...

You might also like