SlideShare une entreprise Scribd logo
1  sur  10
OperatorsOperators
inin
C ++C ++
Made By:- Pranav GhildiyalMade By:- Pranav Ghildiyal
Class :- ‘XI’ ‘B’Class :- ‘XI’ ‘B’
ARITHEMATIC OPERATORS
PLEASE
NOTE :- C+
+ is case-
sensitive
a , A both
are
different
Unary plus
A= 5A= 5
Unary minus
-A = -5-A = -5
INCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATOR
• These operators increase or decrease the
value of the operand by 1
• Increment increases by 1 while the decrement
decreases by 1
PREFIX VERSION
It follows the change then use rule i.e., it
first changes the value of the operand and
then use the new value to evaluate the
expression
POSTFIX VERSION
It follows the use then change rule i.e., it first
uses the new value of the operand in
evaluating the expression and then changes
the operands value
.
Operators that act upon two operands
are known as binary operators
Relational operators refer to the relationship that values can have with one another .
Relational operators don’t work with string. We can compare numbers and characters with
them. If the comparison results in true , the relational operators results in the value 1 else it
results in the value 0 (comparison results in false).
LOGICAL OPERATORSLOGICAL OPERATORS
Logical AND
The resulting expressions
gives the value 1 only if
both the original operands
are true
Logical OR
The resulting expressions
gives the value 1 if either
of the original operands
is true
Logical NOT
It is a unary operator. It
reverses the truth value of the
expression and gives true if
the expression is false
11 Logical OR and Logical AND has lower precedence than relational operatorsLogical OR and Logical AND has lower precedence than relational operators
22 Logical NOT has higher precedence over any relational or arithimatic operatorLogical NOT has higher precedence over any relational or arithimatic operator
Facts about operatorsFacts about operators
CONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATOR
SOME OTHER OPERATORSSOME OTHER OPERATORS
COMPILE TIME OPERATOR
• It returns the length (in
bytes) of the variable / type
specified
COMMA OPERATOR
IntegerInteger 2 Bytes2 Bytes
CharacterCharacter 1 Bytes1 Bytes
FloatFloat 4 Bytes4 Bytes
DoubleDouble 8 Bytes8 Bytes
• It is used to string together
several group of expressions.
The result of the rightmost
expression becomes the value
of the total comma seprated
expression
SOME OTHER OPERATORSSOME OTHER OPERATORS
COMPILE TIME OPERATOR
• It returns the length (in
bytes) of the variable / type
specified
COMMA OPERATOR
IntegerInteger 2 Bytes2 Bytes
CharacterCharacter 1 Bytes1 Bytes
FloatFloat 4 Bytes4 Bytes
DoubleDouble 8 Bytes8 Bytes
• It is used to string together
several group of expressions.
The result of the rightmost
expression becomes the value
of the total comma seprated
expression

Contenu connexe

Tendances (20)

Operators
OperatorsOperators
Operators
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
 
Operators and Expressions in Java
Operators and Expressions in JavaOperators and Expressions in Java
Operators and Expressions in Java
 
Basic c operators
Basic c operatorsBasic c operators
Basic c operators
 
Operator.ppt
Operator.pptOperator.ppt
Operator.ppt
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
 
Operators and Expression
Operators and ExpressionOperators and Expression
Operators and Expression
 
C# operators
C# operatorsC# operators
C# operators
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
 
Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++
 
Operators in C++
Operators in C++Operators in C++
Operators in C++
 
Operators
OperatorsOperators
Operators
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Lecture03(c expressions & operators)
Lecture03(c expressions & operators)Lecture03(c expressions & operators)
Lecture03(c expressions & operators)
 
Types of operators in C
Types of operators in CTypes of operators in C
Types of operators in C
 
COM1407: C Operators
COM1407: C OperatorsCOM1407: C Operators
COM1407: C Operators
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
 

En vedette

C++ Project: Point of Sales System for an Audio and Video Shop
C++ Project: Point of Sales System for an Audio and Video ShopC++ Project: Point of Sales System for an Audio and Video Shop
C++ Project: Point of Sales System for an Audio and Video Shopprojectlearner
 
Activities on Operator Precedence and Associativity
Activities on Operator Precedence and AssociativityActivities on Operator Precedence and Associativity
Activities on Operator Precedence and AssociativityNicole Ynne Estabillo
 
Operator Precedence and Associativity
Operator Precedence and AssociativityOperator Precedence and Associativity
Operator Precedence and AssociativityNicole Ynne Estabillo
 
03. operators and-expressions
03. operators and-expressions03. operators and-expressions
03. operators and-expressionsStoian Kirov
 
Computer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcpComputer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcpSaumya Sahu
 
Expectations (Algebra 1)
Expectations (Algebra 1)Expectations (Algebra 1)
Expectations (Algebra 1)rfant
 
Employee Management System in C++
Employee Management System in C++Employee Management System in C++
Employee Management System in C++Jayant Gope
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language Mohamed Loey
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++KurdGul
 
algebraic expression class VIII
algebraic expression class VIIIalgebraic expression class VIII
algebraic expression class VIIIHimani Priya
 
Fundamentals Of Computer
Fundamentals Of ComputerFundamentals Of Computer
Fundamentals Of ComputerJack Frost
 
basics of computer system ppt
basics of computer system pptbasics of computer system ppt
basics of computer system pptSuaj
 

En vedette (19)

C++ Project: Point of Sales System for an Audio and Video Shop
C++ Project: Point of Sales System for an Audio and Video ShopC++ Project: Point of Sales System for an Audio and Video Shop
C++ Project: Point of Sales System for an Audio and Video Shop
 
Activities on Operator Precedence and Associativity
Activities on Operator Precedence and AssociativityActivities on Operator Precedence and Associativity
Activities on Operator Precedence and Associativity
 
Operator Precedence and Associativity
Operator Precedence and AssociativityOperator Precedence and Associativity
Operator Precedence and Associativity
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Matrices
MatricesMatrices
Matrices
 
03. operators and-expressions
03. operators and-expressions03. operators and-expressions
03. operators and-expressions
 
Operators
OperatorsOperators
Operators
 
Computer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcpComputer Fundamentals Chapter 11 pcp
Computer Fundamentals Chapter 11 pcp
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
Expectations (Algebra 1)
Expectations (Algebra 1)Expectations (Algebra 1)
Expectations (Algebra 1)
 
Intro to C++ - language
Intro to C++ - languageIntro to C++ - language
Intro to C++ - language
 
Employee Management System in C++
Employee Management System in C++Employee Management System in C++
Employee Management System in C++
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
algebraic expression class VIII
algebraic expression class VIIIalgebraic expression class VIII
algebraic expression class VIII
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
Fundamentals Of Computer
Fundamentals Of ComputerFundamentals Of Computer
Fundamentals Of Computer
 
basics of computer system ppt
basics of computer system pptbasics of computer system ppt
basics of computer system ppt
 

Similaire à CBSE Class XI :- Operators in C++

Similaire à CBSE Class XI :- Operators in C++ (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
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
Java script session 4
Java script session 4Java script session 4
Java script session 4
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
operat in vb .pptx
operat in vb .pptxoperat in vb .pptx
operat in vb .pptx
 
OPERATORS OF C++
OPERATORS OF C++OPERATORS OF C++
OPERATORS OF C++
 
Operators in Python
Operators in PythonOperators in Python
Operators in Python
 
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
 
9 cm604.10
9 cm604.109 cm604.10
9 cm604.10
 
Chap 3(operator expression)
Chap 3(operator expression)Chap 3(operator expression)
Chap 3(operator expression)
 
c# operators
c# operatorsc# operators
c# operators
 
Operators and Expressions
Operators and ExpressionsOperators and Expressions
Operators and Expressions
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
L3 operators
L3 operatorsL3 operators
L3 operators
 
Coper in C
Coper in CCoper in C
Coper in C
 
Py-Slides-2 (1).ppt
Py-Slides-2 (1).pptPy-Slides-2 (1).ppt
Py-Slides-2 (1).ppt
 
Py-Slides-2.ppt
Py-Slides-2.pptPy-Slides-2.ppt
Py-Slides-2.ppt
 
Py-Slides-2.ppt
Py-Slides-2.pptPy-Slides-2.ppt
Py-Slides-2.ppt
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 

Plus de Pranav Ghildiyal

Global warming :- A PowerPoint Presentation
Global warming :- A PowerPoint PresentationGlobal warming :- A PowerPoint Presentation
Global warming :- A PowerPoint PresentationPranav Ghildiyal
 
A Report On Disaster Management
A Report On Disaster ManagementA Report On Disaster Management
A Report On Disaster ManagementPranav Ghildiyal
 
Recycle and reuse of everyday material
Recycle and reuse of everyday materialRecycle and reuse of everyday material
Recycle and reuse of everyday materialPranav Ghildiyal
 
CBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical fileCBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical filePranav Ghildiyal
 
CBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detectorCBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detectorPranav Ghildiyal
 
CBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threadsCBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threadsPranav Ghildiyal
 
CBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europeCBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europePranav Ghildiyal
 
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challengeCBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challengePranav Ghildiyal
 
CBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics SoundCBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics SoundPranav Ghildiyal
 
CBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resourcesCBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resourcesPranav Ghildiyal
 
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pureCBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us purePranav Ghildiyal
 
CBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equationsCBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equationsPranav Ghildiyal
 
CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)Pranav Ghildiyal
 
CBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionCBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionPranav Ghildiyal
 
CBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalitiesCBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalitiesPranav Ghildiyal
 

Plus de Pranav Ghildiyal (20)

Lasers
LasersLasers
Lasers
 
Global warming :- A PowerPoint Presentation
Global warming :- A PowerPoint PresentationGlobal warming :- A PowerPoint Presentation
Global warming :- A PowerPoint Presentation
 
A Report On Disaster Management
A Report On Disaster ManagementA Report On Disaster Management
A Report On Disaster Management
 
Recycle and reuse of everyday material
Recycle and reuse of everyday materialRecycle and reuse of everyday material
Recycle and reuse of everyday material
 
Word of the day (may)
Word of  the day (may)Word of  the day (may)
Word of the day (may)
 
Boost your knowledge
Boost your knowledgeBoost your knowledge
Boost your knowledge
 
CBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical fileCBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical file
 
CBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detectorCBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detector
 
CBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threadsCBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threads
 
Shopping mall
Shopping mallShopping mall
Shopping mall
 
CBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europeCBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europe
 
H1 n1 swine flu
H1 n1 swine fluH1 n1 swine flu
H1 n1 swine flu
 
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challengeCBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
 
CBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics SoundCBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics Sound
 
CBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resourcesCBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resources
 
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pureCBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
 
CBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equationsCBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equations
 
CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)
 
CBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionCBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progression
 
CBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalitiesCBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalities
 

Dernier

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Dernier (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

CBSE Class XI :- Operators in C++

  • 1. OperatorsOperators inin C ++C ++ Made By:- Pranav GhildiyalMade By:- Pranav Ghildiyal Class :- ‘XI’ ‘B’Class :- ‘XI’ ‘B’
  • 2.
  • 3. ARITHEMATIC OPERATORS PLEASE NOTE :- C+ + is case- sensitive a , A both are different Unary plus A= 5A= 5 Unary minus -A = -5-A = -5
  • 4. INCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATORINCREMENT AND DECREMENT OPERATOR • These operators increase or decrease the value of the operand by 1 • Increment increases by 1 while the decrement decreases by 1 PREFIX VERSION It follows the change then use rule i.e., it first changes the value of the operand and then use the new value to evaluate the expression POSTFIX VERSION It follows the use then change rule i.e., it first uses the new value of the operand in evaluating the expression and then changes the operands value
  • 5. . Operators that act upon two operands are known as binary operators
  • 6. Relational operators refer to the relationship that values can have with one another . Relational operators don’t work with string. We can compare numbers and characters with them. If the comparison results in true , the relational operators results in the value 1 else it results in the value 0 (comparison results in false).
  • 7. LOGICAL OPERATORSLOGICAL OPERATORS Logical AND The resulting expressions gives the value 1 only if both the original operands are true Logical OR The resulting expressions gives the value 1 if either of the original operands is true Logical NOT It is a unary operator. It reverses the truth value of the expression and gives true if the expression is false 11 Logical OR and Logical AND has lower precedence than relational operatorsLogical OR and Logical AND has lower precedence than relational operators 22 Logical NOT has higher precedence over any relational or arithimatic operatorLogical NOT has higher precedence over any relational or arithimatic operator Facts about operatorsFacts about operators
  • 8. CONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATORCONDITIONAL OPERATOR ( ? : ) OR TERNARY OPERATOR
  • 9. SOME OTHER OPERATORSSOME OTHER OPERATORS COMPILE TIME OPERATOR • It returns the length (in bytes) of the variable / type specified COMMA OPERATOR IntegerInteger 2 Bytes2 Bytes CharacterCharacter 1 Bytes1 Bytes FloatFloat 4 Bytes4 Bytes DoubleDouble 8 Bytes8 Bytes • It is used to string together several group of expressions. The result of the rightmost expression becomes the value of the total comma seprated expression
  • 10. SOME OTHER OPERATORSSOME OTHER OPERATORS COMPILE TIME OPERATOR • It returns the length (in bytes) of the variable / type specified COMMA OPERATOR IntegerInteger 2 Bytes2 Bytes CharacterCharacter 1 Bytes1 Bytes FloatFloat 4 Bytes4 Bytes DoubleDouble 8 Bytes8 Bytes • It is used to string together several group of expressions. The result of the rightmost expression becomes the value of the total comma seprated expression