SlideShare a Scribd company logo
Computer science
OperatOrs in c++
Made By :- KartiK and
MayanK
OperatOrs in c++
●
Operators are special type of
functions, that takes one or more
arguments and produces a new
value.
●
For example : addition (+),
substraction (-), multiplication (*)
etc, are all operators.
●
Operators are used to perform
various operations on variables
and constants.
Assignment
Operator
Bitwise
Shift
Operator
Conditional
Operator
Comma
Relational
Operator
LogicalMathematical
Operators
Unary
types Of OperatOrs in c++
assignMent OperatOr
● Operates '=' is used fOr
assignMent, it taKes the
right-hand side (called
rvalue) and cOpy it intO the
left-hand side (called
lvalue). assignMent OperatOr
is the Only OperatOr which
can Be OverlOaded But cannOt
Be inherited.
Bitwise
●
there are used to change individual
Bits into a numBer. they work with only
integral data types
like char, int and long and not with
floating point values.
● Bitwise and operators &
Bitwise or operator |
and Bitwise Xor operator ^
and, Bitwise not operator ~
shift operators
1)shift operators are used to shift Bits of any
variaBle.
2)it is of three types,
3)left shift operator <<
4)right shift operator >>
5)unsigned right shift operator >>>
Unary Operators
● The operators that operate a single operand to from an
expression are known as unary operator etc. The
operators like ++ (INCREMENT)operator, --
(DECREMENT)operator etc. Are the part of unary
operators.
● Other Unary Operators : address of &,
dereference *, new and delete, bitwise not ~,
logical not !, unary minus - and unary plus +.
Conditional Operator
● The conditional operator (? :) is a ternary
operator (it takes three operands). The
conditional operator works as follows:
● The first operand is implicitly converted to
bool. It is evaluated and all side effects are
completed before continuing.
● If the first operand evaluates to true (1), the
second operand is evaluated.
● If the first operand evaluates to false (0), the
third operand is evaluated.
Comma operator
● A Comma operator is used to string together several
expressions. The group of expressions separated by
commas (,) is evaluated left-to-right in sequence and the
result of the right-most expression becomes the value of
total comma - separated expression.
● The comma operator has a lower precedence than the
assignment operator.
Logical Operator
●
The logical operators are AND (&&) and OR (||). They are used to combine two different expressions together.
●
If two statement are connected using AND operator, the validity of both statements will be considered, but if they are
connected using OR operator, then either one of them must be valid. These operators are mostly used in loops
(especially while loop) and in Decision making.
relational
operator
● these operators establish a relationship
between operands. the relational operators
are : less than (<) , grater thatn (>) , less
than or equal to (<=), greater than equal to
(>=), equivalent (==) and not equivalent (!=).
● You must notiCe that assignment operator is
(=) and there is a relational operator, for
equivalent (==). these two are different from
eaCh other, the assignment operator assigns
the value to anY variable, whereas
equivalent operator is used to Compare
values.
mathematiCal operators
● there are operators used to perform basiC
mathematiCal operations. addition (+) ,
subtraCtion (-) , diversion (/) multipliCation (*)
and modulus (%) are the basiC mathematiCal
operators. modulus operator Cannot be used
with floating-point numbers.
● C++ and C also use a shorthand notation to
perform an operation and assignment at same
tYpe.
THANK YOU

More Related Content

What's hot

OCA JAVA - 3 Programming with Java Operators
 OCA JAVA - 3 Programming with Java Operators OCA JAVA - 3 Programming with Java Operators
OCA JAVA - 3 Programming with Java Operators
Fernando Gil
 
CBSE Class XI :- Operators in C++
CBSE Class XI :- Operators in C++CBSE Class XI :- Operators in C++
CBSE Class XI :- Operators in C++Pranav Ghildiyal
 
Operators
OperatorsOperators
Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Deepak Singh
 
Operators in java
Operators in javaOperators in java
Operators in java
Muthukumaran Subramanian
 
Operators in java
Operators in javaOperators in java
Operators in java
yugandhar vadlamudi
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressionsvinay arora
 
C# operators
C# operatorsC# operators
Operator Precedence and Associativity
Operator Precedence and AssociativityOperator Precedence and Associativity
Operator Precedence and Associativity
Nicole Ynne Estabillo
 
Operators
OperatorsOperators
Arithmetic operator
Arithmetic operatorArithmetic operator
Arithmetic operator
Jordan Delacruz
 
Operators and Expression
Operators and ExpressionOperators and Expression
Operators and Expressionshubham_jangid
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++
Online
 
Relational operators
Relational operatorsRelational operators
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
savitamhaske
 
Operator.ppt
Operator.pptOperator.ppt
Operator.ppt
Darshan Patel
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
Praveen M Jigajinni
 

What's hot (20)

OCA JAVA - 3 Programming with Java Operators
 OCA JAVA - 3 Programming with Java Operators OCA JAVA - 3 Programming with Java Operators
OCA JAVA - 3 Programming with Java Operators
 
CBSE Class XI :- Operators in C++
CBSE Class XI :- Operators in C++CBSE Class XI :- Operators in C++
CBSE Class XI :- Operators in C++
 
Operators
OperatorsOperators
Operators
 
Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Chapter 5 - Operators in C++
Chapter 5 - Operators in C++
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Operators in java
Operators in javaOperators in java
Operators in java
 
C Prog. - Operators and Expressions
C Prog. - Operators and ExpressionsC Prog. - Operators and Expressions
C Prog. - Operators and Expressions
 
C# operators
C# operatorsC# operators
C# operators
 
Java basic operators
Java basic operatorsJava basic operators
Java basic operators
 
Report on c
Report on cReport on c
Report on c
 
Operator Precedence and Associativity
Operator Precedence and AssociativityOperator Precedence and Associativity
Operator Precedence and Associativity
 
Operators
OperatorsOperators
Operators
 
Arithmetic operator
Arithmetic operatorArithmetic operator
Arithmetic operator
 
Operators and Expression
Operators and ExpressionOperators and Expression
Operators and Expression
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++
 
Relational operators
Relational operatorsRelational operators
Relational operators
 
Lecture03(c expressions & operators)
Lecture03(c expressions & operators)Lecture03(c expressions & operators)
Lecture03(c expressions & operators)
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
 
Operator.ppt
Operator.pptOperator.ppt
Operator.ppt
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 

Similar to operators in c++

OPERATORS OF C++
OPERATORS OF C++OPERATORS OF C++
OPERATORS OF C++
ANANT VYAS
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
Jasleen Kaur (Chandigarh University)
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
Thesis Scientist Private Limited
 
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
Simplilearn
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
sanya6900
 
4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt
RithwikRanjan
 
OPERATORS IN C.pptx
OPERATORS IN C.pptxOPERATORS IN C.pptx
OPERATORS IN C.pptx
SKUP1
 
OPERATORS IN C.pptx
OPERATORS IN C.pptxOPERATORS IN C.pptx
OPERATORS IN C.pptx
LECO9
 
OCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & StatementsOCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & Statements
İbrahim Kürce
 
C operator and expression
C operator and expressionC operator and expression
C operator and expression
LavanyaManokaran
 
Unit ii chapter 1 operator and expressions in c
Unit ii chapter 1 operator and expressions in cUnit ii chapter 1 operator and expressions in c
Unit ii chapter 1 operator and expressions in c
Sowmya Jyothi
 
cprogrammingoperator.ppt
cprogrammingoperator.pptcprogrammingoperator.ppt
cprogrammingoperator.ppt
georgejustymirobi1
 
C PRESENTATION.pptx
C PRESENTATION.pptxC PRESENTATION.pptx
C PRESENTATION.pptx
VAIBHAV175947
 
Operator precedence and associativity
Operator precedence and associativityOperator precedence and associativity
Operator precedence and associativity
Dr.Sandhiya Ravi
 
Operator precedence and associativity
Operator precedence and associativityOperator precedence and associativity
Operator precedence and associativity
Dr.Sandhiya Ravi
 
Operators in java
Operators in javaOperators in java
Operators in java
AbhishekMondal42
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
teach4uin
 
Opeartor &amp; expression
Opeartor &amp; expressionOpeartor &amp; expression
Opeartor &amp; expression
V.V.Vanniapermal College for Women
 
c# operators
c# operatorsc# operators
c# operators
Micheal Ogundero
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++bajiajugal
 

Similar to operators in c++ (20)

OPERATORS OF C++
OPERATORS OF C++OPERATORS OF C++
OPERATORS OF C++
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
Operators and Expressions in C#
Operators and Expressions in C#Operators and Expressions in C#
Operators and Expressions in C#
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt4_A1208223655_21789_2_2018_04. Operators.ppt
4_A1208223655_21789_2_2018_04. Operators.ppt
 
OPERATORS IN C.pptx
OPERATORS IN C.pptxOPERATORS IN C.pptx
OPERATORS IN C.pptx
 
OPERATORS IN C.pptx
OPERATORS IN C.pptxOPERATORS IN C.pptx
OPERATORS IN C.pptx
 
OCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & StatementsOCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & Statements
 
C operator and expression
C operator and expressionC operator and expression
C operator and expression
 
Unit ii chapter 1 operator and expressions in c
Unit ii chapter 1 operator and expressions in cUnit ii chapter 1 operator and expressions in c
Unit ii chapter 1 operator and expressions in c
 
cprogrammingoperator.ppt
cprogrammingoperator.pptcprogrammingoperator.ppt
cprogrammingoperator.ppt
 
C PRESENTATION.pptx
C PRESENTATION.pptxC PRESENTATION.pptx
C PRESENTATION.pptx
 
Operator precedence and associativity
Operator precedence and associativityOperator precedence and associativity
Operator precedence and associativity
 
Operator precedence and associativity
Operator precedence and associativityOperator precedence and associativity
Operator precedence and associativity
 
Operators in java
Operators in javaOperators in java
Operators in java
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
 
Opeartor &amp; expression
Opeartor &amp; expressionOpeartor &amp; expression
Opeartor &amp; expression
 
c# operators
c# operatorsc# operators
c# operators
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
 

Recently uploaded

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 

Recently uploaded (20)

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 

operators in c++

  • 1. Computer science OperatOrs in c++ Made By :- KartiK and MayanK
  • 2. OperatOrs in c++ ● Operators are special type of functions, that takes one or more arguments and produces a new value. ● For example : addition (+), substraction (-), multiplication (*) etc, are all operators. ● Operators are used to perform various operations on variables and constants.
  • 4. assignMent OperatOr ● Operates '=' is used fOr assignMent, it taKes the right-hand side (called rvalue) and cOpy it intO the left-hand side (called lvalue). assignMent OperatOr is the Only OperatOr which can Be OverlOaded But cannOt Be inherited.
  • 5. Bitwise ● there are used to change individual Bits into a numBer. they work with only integral data types like char, int and long and not with floating point values. ● Bitwise and operators & Bitwise or operator | and Bitwise Xor operator ^ and, Bitwise not operator ~
  • 6. shift operators 1)shift operators are used to shift Bits of any variaBle. 2)it is of three types, 3)left shift operator << 4)right shift operator >> 5)unsigned right shift operator >>>
  • 7. Unary Operators ● The operators that operate a single operand to from an expression are known as unary operator etc. The operators like ++ (INCREMENT)operator, -- (DECREMENT)operator etc. Are the part of unary operators. ● Other Unary Operators : address of &, dereference *, new and delete, bitwise not ~, logical not !, unary minus - and unary plus +.
  • 8. Conditional Operator ● The conditional operator (? :) is a ternary operator (it takes three operands). The conditional operator works as follows: ● The first operand is implicitly converted to bool. It is evaluated and all side effects are completed before continuing. ● If the first operand evaluates to true (1), the second operand is evaluated. ● If the first operand evaluates to false (0), the third operand is evaluated.
  • 9. Comma operator ● A Comma operator is used to string together several expressions. The group of expressions separated by commas (,) is evaluated left-to-right in sequence and the result of the right-most expression becomes the value of total comma - separated expression. ● The comma operator has a lower precedence than the assignment operator.
  • 10. Logical Operator ● The logical operators are AND (&&) and OR (||). They are used to combine two different expressions together. ● If two statement are connected using AND operator, the validity of both statements will be considered, but if they are connected using OR operator, then either one of them must be valid. These operators are mostly used in loops (especially while loop) and in Decision making.
  • 11. relational operator ● these operators establish a relationship between operands. the relational operators are : less than (<) , grater thatn (>) , less than or equal to (<=), greater than equal to (>=), equivalent (==) and not equivalent (!=). ● You must notiCe that assignment operator is (=) and there is a relational operator, for equivalent (==). these two are different from eaCh other, the assignment operator assigns the value to anY variable, whereas equivalent operator is used to Compare values.
  • 12. mathematiCal operators ● there are operators used to perform basiC mathematiCal operations. addition (+) , subtraCtion (-) , diversion (/) multipliCation (*) and modulus (%) are the basiC mathematiCal operators. modulus operator Cannot be used with floating-point numbers. ● C++ and C also use a shorthand notation to perform an operation and assignment at same tYpe.