0% found this document useful (0 votes)
27 views9 pages

UNIT LL Operators

The document discusses operators in C programming, defining them as symbols that perform specific computations on values and variables, known as operands. It categorizes operators into five types: arithmetic, relational, logical, bitwise, and assignment operators, explaining their functions and uses. Additionally, it highlights the importance of data type compatibility in assignment operations and introduces compound operators for efficiency.

Uploaded by

muskandel2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views9 pages

UNIT LL Operators

The document discusses operators in C programming, defining them as symbols that perform specific computations on values and variables, known as operands. It categorizes operators into five types: arithmetic, relational, logical, bitwise, and assignment operators, explaining their functions and uses. Additionally, it highlights the importance of data type compatibility in assignment operations and introduces compound operators for efficiency.

Uploaded by

muskandel2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Programming For Problem Solving

Unit ll: “Operators in Programming”


Operators in Programming

Operators in Programming

An operator in C can be defined as the symbol that helps us to perform some


specific mathematical, relational, bitwise, conditional, or logical computations
on values and variables. The values and variables used with operators are
called operands. So, we can say that the operators are the symbols that
perform operations on operands.

Assist Professor. Varinder Singh (Dept. Engineering)


Operators in Programming

Types of Operators in C
1. Arithmetic Operators
2. Relational Operators
3. Logical Operators
4. Bitwise Operators
5. Assignment
Operators

Assist Professor. Varinder Singh (Dept. Engineering)


Operators in Programming

1. Arithmetic
Operators
Assist Professor. Varinder Singh (Dept. Engineering)
Operators in Programming

Logical Operators are used


to combine two or more
conditions/constraints or to
complement the evaluation
of the original condition in
consideration. The result of
the operation of a logical
operator is a Boolean value
either true or false.

Assist Professor. Varinder Singh (Dept. Engineering)


Operators in Programming

The Bitwise operators are used to


perform bit-level operations on the
operands. The operators are first
converted to bit-level and then the
calculation is performed on the
operands. Mathematical operations
such as addition, subtraction,
multiplication, etc. can be
performed at the bit level for faster
processing.

Assist Professor. Varinder Singh (Dept. Engineering)


Operators in Programming

Assignment Operators in C
• Assignment operators are used to assign value
to a variable. The left side operand of the
assignment operator is a variable and the right
side operand of the assignment operator is a
value. The value on the right side must be of the
same data type as the variable on the left side
otherwise the compiler will raise an error.
• The assignment operators can be combined with
some other operators in C to provide multiple
operations using single operator. These
operators are called compound operators.

Assist Professor. Varinder Singh (Dept. Engineering)


Operators in Programming

•Any Question?

Assist Professor. Varinder Singh (Dept. Engineering)


Operators in Programming

•THANK YOU

Assist Professor. Varinder Singh (Dept. Engineering)

You might also like