SlideShare a Scribd company logo
2
Most read
3
Most read
8
Most read
OPERATORS IN C++
Operators are the foundation of any programming language. Thus the functionality of C++ programming
language is incomplete without the use of operators. We can define operators as symbols that help us to perform specific
mathematical and logical computations on operands.
Types of Operators
1. Arithmetic operator
2. Relational operator
3. Logical operators
4. Bitwise operator
5. Assignment operator
Arithmetic operator
Arithmetic operators perform some arithmetic operation on one or two operands.
Arithmetic operators are two type:-
 Unary operator (++ , - -)
 Binary operator (+ , - , * , / , %)
Relational operator
 Relational operators define the relation between two entities.
 They are mainly use to compare variable with other variable and constant
 Returns Boolean value.
= = Give true value if both operand have equal value
!= Gives true if both operands are not equal
> Gives true if left operand is more than right operand
< Gives true if left operand is less than right operand
>= Gives true if left operand is more than or equal to right operand
<= Gives true if left operand is less than or equal to right operand
Logical operators
 These operators are used to combine two or more condition .
 Result of the operation is Boolean.
Operator Example Meaning
AND(&&) expression1 && expression2 True only if all the operands are true.
OR(||) expression1 || expression2 True if at least one of the operands is true.
NOT(!) !expression True only if the operand is false.
Bitwise operator
Bitwise operators are the operators that operate on bits and perform bit-by-bit operations.
Operator Description
& Bitwise AND Operator
| Bitwise OR Operator
^ Bitwise XOR Operator
~ Bitwise Complement Operator
<< Bitwise Left Shift Operator
>> Bitwise Right Shift Operator
Assignment operator
 The Assignment operator is used to assign a value to a variable.
 These are operators used to perform an arithmetic function on an operand and assign the new value to the
operand at the same time.
Operator Example Equivalent to
= a = b; a = b;
+= a += b; a = a + b;
-= a -= b; a = a - b;
*= a *= b; a = a * b;
/= a /= b; a = a / b;
X = 50;
Variable Value
THANK YOU

More Related Content

PPTX
C++ decision making
PPTX
Variable, constant, operators and control statement
PPTX
Operator.ppt
PPTX
Operators in Python
PDF
Lecture 01 introduction to compiler
PPTX
Phases of Compiler
PDF
Python programming : Control statements
PPTX
Operators and expressions in C++
C++ decision making
Variable, constant, operators and control statement
Operator.ppt
Operators in Python
Lecture 01 introduction to compiler
Phases of Compiler
Python programming : Control statements
Operators and expressions in C++

What's hot (20)

PPTX
Data Types In C
PPTX
Intermediate code- generation
PPSX
Complete C programming Language Course
PPTX
types conversion in python with exa.pptx
PPTX
PPT
Operators in C++
PPT
08 logic simplification
PPTX
VB Function and procedure
PPTX
Unit 1 polynomial manipulation
PPTX
PPT
Looping in C
PPTX
Variables in C++, data types in c++
PPT
Operator precedence and associativity
PPTX
Loops in Python
PPTX
Operators php
PPTX
Three Address code
PPTX
Introduction to c++
PPTX
Pointers in c language
PPT
Bitwise Operators in C
Data Types In C
Intermediate code- generation
Complete C programming Language Course
types conversion in python with exa.pptx
Operators in C++
08 logic simplification
VB Function and procedure
Unit 1 polynomial manipulation
Looping in C
Variables in C++, data types in c++
Operator precedence and associativity
Loops in Python
Operators php
Three Address code
Introduction to c++
Pointers in c language
Bitwise Operators in C
Ad

Similar to Operators in c++ (20)

PPTX
Python operators part2
PPTX
Operators and it's type
PPTX
Operators in C & C++ Language
PDF
itft-Operators in java
PDF
Python basic operators
PPTX
Opeartor &amp; expression
PDF
Constructor and destructors
PPTX
lecture4 pgdca.pptx
ODP
Operators
ODP
operators in c++
ODP
operators in c++
PPTX
C Operators
PPTX
Session03 operators
PPTX
Operators in C/C++
PDF
Operators in c programming
PPTX
C PRESENTATION.pptx
PPTX
operatorsincprogramming-190221094522.pptx
PPTX
Python notes for students to develop and learn
PPTX
Operators in c++ programming types of variables
Python operators part2
Operators and it's type
Operators in C & C++ Language
itft-Operators in java
Python basic operators
Opeartor &amp; expression
Constructor and destructors
lecture4 pgdca.pptx
Operators
operators in c++
operators in c++
C Operators
Session03 operators
Operators in C/C++
Operators in c programming
C PRESENTATION.pptx
operatorsincprogramming-190221094522.pptx
Python notes for students to develop and learn
Operators in c++ programming types of variables
Ad

More from ABHIJITPATRA23 (8)

PPTX
packages java.pptx
PPTX
A report on application of probability to control the flow of traffic through...
PPTX
Raspberry pi
DOCX
Home security system
PPTX
laplace transform of function of the 풕^풏f(t)
PPTX
(Project)study of fourier integrals
DOCX
Climate change impact on organization
PPTX
C++ student management system
packages java.pptx
A report on application of probability to control the flow of traffic through...
Raspberry pi
Home security system
laplace transform of function of the 풕^풏f(t)
(Project)study of fourier integrals
Climate change impact on organization
C++ student management system

Recently uploaded (20)

PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Welding lecture in detail for understanding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Sustainable Sites - Green Building Construction
PPT
Mechanical Engineering MATERIALS Selection
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Internet of Things (IOT) - A guide to understanding
Lecture Notes Electrical Wiring System Components
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Welding lecture in detail for understanding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
bas. eng. economics group 4 presentation 1.pptx
R24 SURVEYING LAB MANUAL for civil enggi
additive manufacturing of ss316l using mig welding
Sustainable Sites - Green Building Construction
Mechanical Engineering MATERIALS Selection
UNIT-1 - COAL BASED THERMAL POWER PLANTS
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

Operators in c++

  • 2. Operators are the foundation of any programming language. Thus the functionality of C++ programming language is incomplete without the use of operators. We can define operators as symbols that help us to perform specific mathematical and logical computations on operands.
  • 3. Types of Operators 1. Arithmetic operator 2. Relational operator 3. Logical operators 4. Bitwise operator 5. Assignment operator
  • 4. Arithmetic operator Arithmetic operators perform some arithmetic operation on one or two operands. Arithmetic operators are two type:-  Unary operator (++ , - -)  Binary operator (+ , - , * , / , %)
  • 5. Relational operator  Relational operators define the relation between two entities.  They are mainly use to compare variable with other variable and constant  Returns Boolean value. = = Give true value if both operand have equal value != Gives true if both operands are not equal > Gives true if left operand is more than right operand < Gives true if left operand is less than right operand >= Gives true if left operand is more than or equal to right operand <= Gives true if left operand is less than or equal to right operand
  • 6. Logical operators  These operators are used to combine two or more condition .  Result of the operation is Boolean. Operator Example Meaning AND(&&) expression1 && expression2 True only if all the operands are true. OR(||) expression1 || expression2 True if at least one of the operands is true. NOT(!) !expression True only if the operand is false.
  • 7. Bitwise operator Bitwise operators are the operators that operate on bits and perform bit-by-bit operations. Operator Description & Bitwise AND Operator | Bitwise OR Operator ^ Bitwise XOR Operator ~ Bitwise Complement Operator << Bitwise Left Shift Operator >> Bitwise Right Shift Operator
  • 8. Assignment operator  The Assignment operator is used to assign a value to a variable.  These are operators used to perform an arithmetic function on an operand and assign the new value to the operand at the same time. Operator Example Equivalent to = a = b; a = b; += a += b; a = a + b; -= a -= b; a = a - b; *= a *= b; a = a * b; /= a /= b; a = a / b; X = 50; Variable Value