SlideShare a Scribd company logo
1 of 19
Download to read offline
Programming Fundamentals
Lecture 3
Objectives
• To know about basic data types and memory
concepts
• To know about arithmetic operators
• To know about equality and assignment
operators
• To review the relational operators
• To revise the use of the increment and decrement
operators
• To know about compound operators
• To know about manipulators
CS214 - PF 2
Course Instructor : Muhammad Haris
Mohsin
Memory Concepts
• While doing programming in any
programming language, you need to use
various variables to store various information
• Variables are nothing but reserved memory
locations to store values
• This means that when you create a variable
you reserve some space in memory
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
3
Memory Concepts
• int number1;
• int number2;
• int sum;
• number1 = 45;
• number1 = 72;
• sum = number1 + number2;
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
4
45
72
117
Data Types
• When you declare a variable in C++, it reserve
some memory space
• How much memory a variable will take??
• It depends on the type of variable, often
called as data type
• Some built-in data types are given in next slide
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
5
Data Types
• Some basic data types are given below
• Several of the basic types can be modified using
signed, un-signed, long and short modifiers
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
6
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
7
Data Types
• The sizes of variables might be different from
those shown in the last table, depending on
the compiler and the computer you are using
• To produce the correct size of any data type
within your compiler you can use sizeof()
operator
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
8
Data Types
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
9
Arithmetic Operations
• You can perform following operations in C++
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
10
Arithmetic Operations
• Addition, subtraction and multiplication can be used on
integers, float, double etc
• The integer division (/) can only be used with integers
– For example 26/4 will produce the answer 6
– Similarly 61/6 will produce the answer 10
• The modulus operator (%) can be used with integers
only and return the remained of the division
– For example 26%4 will produce the answer 2
– Similarly 61%6 will produce the answer 1
• The use of “/” and “%” operator with non-integer
variables will produce an error if automatic type
conversion is not available in your compiler
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
11
Simple Tasks
2. Write a program in C++ to add three numbers (that
can be integer or float) entered by the user and
display the numbers and their sum on the screen
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
12
Simple Tasks
3. Write a program to convert seconds entered
by user to hours, minutes and seconds. The
display should be in standard format like
Hours : Minutes : Seconds
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
13
Equality & Assignment Operator
• == is an equality operator, which is used for
comparison of two variables
 A==B;
 The above statement will compare the values of A and
B
• = is an assignment operator, which assigns a value
to a variable
 A = B;
 The above statement means that the value of B is
assigned to A
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
14
Relational Operations in C++
• Relational operators and their C++ syntax
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
15
Common Errors
• Reversing the order of pair of symbols in the
operators !=, >= or <= (writing them as =!, =>
and =<)
– It will normally lead towards a syntax error
• Confusing the equality (==) operator with
assignment (=) operator
– It will result as a logical error
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
16
Increment and Decrement Operators
• Increment operator (++) increases the value of a
variable by 1
• There are two types of increment operator
– Pre-increment
– Post-increment
• Decrement operator (--) decreases the value of a
variable by 1
• There are two types of decrement operator
– Pre-decrement
– Post-decrement
CS214 - PF
Course Instructor : Muhammad Haris
Mohsin
17
Pre and Post Increment/Decrement
• ++a  Pre-increment
– Increment a by 1, then use the new value of a in the
expression in which a resides
• a++  Post-increment
– Use the current value of a in the expression in which a
resides then increment a by 1
• --a  Pre-decrement
– Decrement a by 1, then use the new value of a in the
expression in which a resides
• a--  Post-decrement
– Use the current value of a in the expression in which a
resides then decrement a by 1
CS214 - PF 18
Course Instructor : Muhammad Haris
Mohsin
Compound Assignment Operators
• Compound assignments can be used when you want to
modify the value of a variable by performing an
operation on the value currently stored in that variable.
(For example: A = A + 1 )
CS214 - PF 19
Course Instructor : Muhammad Haris
Mohsin

More Related Content

Similar to Lecture 3 spring2018

Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Mohamed El Desouki
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer Ashim Lamichhane
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures Ahmad Idrees
 
Basic of Programming (Introduction to Programming)
Basic of Programming (Introduction to Programming)Basic of Programming (Introduction to Programming)
Basic of Programming (Introduction to Programming)JohnNama
 
COM1407: Structured Program Development
COM1407: Structured Program Development COM1407: Structured Program Development
COM1407: Structured Program Development Hemantha Kulathilake
 
Ix564 team a unit 4 p-pt
Ix564  team a unit 4 p-ptIx564  team a unit 4 p-pt
Ix564 team a unit 4 p-ptDonald Edwards
 
Se 381 - lec 25 - 32 - 12 may29 - program size and cost estimation models
Se 381 - lec 25 - 32 - 12 may29 - program size and cost estimation modelsSe 381 - lec 25 - 32 - 12 may29 - program size and cost estimation models
Se 381 - lec 25 - 32 - 12 may29 - program size and cost estimation modelsbabak danyal
 
Cse115 lecture03problemsolving
Cse115 lecture03problemsolvingCse115 lecture03problemsolving
Cse115 lecture03problemsolvingMd. Ashikur Rahman
 
model lesson plan class 10th computer
model lesson plan class 10th computermodel lesson plan class 10th computer
model lesson plan class 10th computerSamar Hussain
 
Object oriented programming 11 preprocessor directives and program structure
Object oriented programming 11 preprocessor directives and program structureObject oriented programming 11 preprocessor directives and program structure
Object oriented programming 11 preprocessor directives and program structureVaibhav Khanna
 
04 Functional Programming in Python
04 Functional Programming in Python04 Functional Programming in Python
04 Functional Programming in PythonEbad ullah Qureshi
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxVigneshkumar Ponnusamy
 
CIS110 Computer Programming Design Chapter (9)
CIS110 Computer Programming Design Chapter  (9)CIS110 Computer Programming Design Chapter  (9)
CIS110 Computer Programming Design Chapter (9)Dr. Ahmed Al Zaidy
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: ModularityNicole Ryan
 
Class 2 variables, classes methods...
Class 2   variables, classes methods...Class 2   variables, classes methods...
Class 2 variables, classes methods...Fernando Loizides
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDeepikaV81
 

Similar to Lecture 3 spring2018 (20)

Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
 
Basic of Programming (Introduction to Programming)
Basic of Programming (Introduction to Programming)Basic of Programming (Introduction to Programming)
Basic of Programming (Introduction to Programming)
 
COM1407: Structured Program Development
COM1407: Structured Program Development COM1407: Structured Program Development
COM1407: Structured Program Development
 
Ix564 team a unit 4 p-pt
Ix564  team a unit 4 p-ptIx564  team a unit 4 p-pt
Ix564 team a unit 4 p-pt
 
Se 381 - lec 25 - 32 - 12 may29 - program size and cost estimation models
Se 381 - lec 25 - 32 - 12 may29 - program size and cost estimation modelsSe 381 - lec 25 - 32 - 12 may29 - program size and cost estimation models
Se 381 - lec 25 - 32 - 12 may29 - program size and cost estimation models
 
Cse115 lecture03problemsolving
Cse115 lecture03problemsolvingCse115 lecture03problemsolving
Cse115 lecture03problemsolving
 
model lesson plan class 10th computer
model lesson plan class 10th computermodel lesson plan class 10th computer
model lesson plan class 10th computer
 
Object oriented programming 11 preprocessor directives and program structure
Object oriented programming 11 preprocessor directives and program structureObject oriented programming 11 preprocessor directives and program structure
Object oriented programming 11 preprocessor directives and program structure
 
04 Functional Programming in Python
04 Functional Programming in Python04 Functional Programming in Python
04 Functional Programming in Python
 
Ch4 Expressions
Ch4 ExpressionsCh4 Expressions
Ch4 Expressions
 
Student Result
Student ResultStudent Result
Student Result
 
Fundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptxFundamentals of Data Structures Unit 1.pptx
Fundamentals of Data Structures Unit 1.pptx
 
CIS110 Computer Programming Design Chapter (9)
CIS110 Computer Programming Design Chapter  (9)CIS110 Computer Programming Design Chapter  (9)
CIS110 Computer Programming Design Chapter (9)
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: Modularity
 
Basic Elements of C++
Basic Elements of C++Basic Elements of C++
Basic Elements of C++
 
Class 2 variables, classes methods...
Class 2   variables, classes methods...Class 2   variables, classes methods...
Class 2 variables, classes methods...
 
The SEI Approach
The SEI ApproachThe SEI Approach
The SEI Approach
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
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
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
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
 

Recently uploaded (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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...
 
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
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
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
 

Lecture 3 spring2018

  • 2. Objectives • To know about basic data types and memory concepts • To know about arithmetic operators • To know about equality and assignment operators • To review the relational operators • To revise the use of the increment and decrement operators • To know about compound operators • To know about manipulators CS214 - PF 2 Course Instructor : Muhammad Haris Mohsin
  • 3. Memory Concepts • While doing programming in any programming language, you need to use various variables to store various information • Variables are nothing but reserved memory locations to store values • This means that when you create a variable you reserve some space in memory CS214 - PF Course Instructor : Muhammad Haris Mohsin 3
  • 4. Memory Concepts • int number1; • int number2; • int sum; • number1 = 45; • number1 = 72; • sum = number1 + number2; CS214 - PF Course Instructor : Muhammad Haris Mohsin 4 45 72 117
  • 5. Data Types • When you declare a variable in C++, it reserve some memory space • How much memory a variable will take?? • It depends on the type of variable, often called as data type • Some built-in data types are given in next slide CS214 - PF Course Instructor : Muhammad Haris Mohsin 5
  • 6. Data Types • Some basic data types are given below • Several of the basic types can be modified using signed, un-signed, long and short modifiers CS214 - PF Course Instructor : Muhammad Haris Mohsin 6
  • 7. CS214 - PF Course Instructor : Muhammad Haris Mohsin 7
  • 8. Data Types • The sizes of variables might be different from those shown in the last table, depending on the compiler and the computer you are using • To produce the correct size of any data type within your compiler you can use sizeof() operator CS214 - PF Course Instructor : Muhammad Haris Mohsin 8
  • 9. Data Types CS214 - PF Course Instructor : Muhammad Haris Mohsin 9
  • 10. Arithmetic Operations • You can perform following operations in C++ CS214 - PF Course Instructor : Muhammad Haris Mohsin 10
  • 11. Arithmetic Operations • Addition, subtraction and multiplication can be used on integers, float, double etc • The integer division (/) can only be used with integers – For example 26/4 will produce the answer 6 – Similarly 61/6 will produce the answer 10 • The modulus operator (%) can be used with integers only and return the remained of the division – For example 26%4 will produce the answer 2 – Similarly 61%6 will produce the answer 1 • The use of “/” and “%” operator with non-integer variables will produce an error if automatic type conversion is not available in your compiler CS214 - PF Course Instructor : Muhammad Haris Mohsin 11
  • 12. Simple Tasks 2. Write a program in C++ to add three numbers (that can be integer or float) entered by the user and display the numbers and their sum on the screen CS214 - PF Course Instructor : Muhammad Haris Mohsin 12
  • 13. Simple Tasks 3. Write a program to convert seconds entered by user to hours, minutes and seconds. The display should be in standard format like Hours : Minutes : Seconds CS214 - PF Course Instructor : Muhammad Haris Mohsin 13
  • 14. Equality & Assignment Operator • == is an equality operator, which is used for comparison of two variables  A==B;  The above statement will compare the values of A and B • = is an assignment operator, which assigns a value to a variable  A = B;  The above statement means that the value of B is assigned to A CS214 - PF Course Instructor : Muhammad Haris Mohsin 14
  • 15. Relational Operations in C++ • Relational operators and their C++ syntax CS214 - PF Course Instructor : Muhammad Haris Mohsin 15
  • 16. Common Errors • Reversing the order of pair of symbols in the operators !=, >= or <= (writing them as =!, => and =<) – It will normally lead towards a syntax error • Confusing the equality (==) operator with assignment (=) operator – It will result as a logical error CS214 - PF Course Instructor : Muhammad Haris Mohsin 16
  • 17. Increment and Decrement Operators • Increment operator (++) increases the value of a variable by 1 • There are two types of increment operator – Pre-increment – Post-increment • Decrement operator (--) decreases the value of a variable by 1 • There are two types of decrement operator – Pre-decrement – Post-decrement CS214 - PF Course Instructor : Muhammad Haris Mohsin 17
  • 18. Pre and Post Increment/Decrement • ++a  Pre-increment – Increment a by 1, then use the new value of a in the expression in which a resides • a++  Post-increment – Use the current value of a in the expression in which a resides then increment a by 1 • --a  Pre-decrement – Decrement a by 1, then use the new value of a in the expression in which a resides • a--  Post-decrement – Use the current value of a in the expression in which a resides then decrement a by 1 CS214 - PF 18 Course Instructor : Muhammad Haris Mohsin
  • 19. Compound Assignment Operators • Compound assignments can be used when you want to modify the value of a variable by performing an operation on the value currently stored in that variable. (For example: A = A + 1 ) CS214 - PF 19 Course Instructor : Muhammad Haris Mohsin