SlideShare a Scribd company logo
1 of 20
 What is “C++” ?
 Benefits of C++ over C language
 Object Oriented Programming in C++
 Datatypes in C++
 Operators in C++
 Variables in C++
 Syntax & Structure of C++ Programme
 Basic example of C++
 Creating Classes in C++
 Controlling structures in C++
 Example of C++
 References
 C++ is an extension of C programming and was
developed by Bjarne Stroustup at AT & T’s Bell
Laboratory in USA in 1980s.
 C++ is an intermediate level language, as it
comprises both high level and low level language
features.
 C++ is a free form, general-purpose language.
 C++ is an Object Oriented Programming
language but is not purely Object Oriented
because of its features like Friend and Virtual
 All the OOP’s features in C++ like Abstraction,
Encapsulation, Inheritance etc makes it more
worthy and useful for programmers.
 C++ supports and allows user defined operators (i.e
Operator Overloading) and function overloading is
also supported in it.
 Inline Functions in C++ instead of Macros in C
language. Inline functions make complete function
body act like Macro, safely.
 Variables can be declared anywhere in the program
in C++, but must be declared before they are used.
 Object-oriented means a
term which is interpreted
differently by different
people.
 Programs are divided into
Objects.
 Data is hidden & not
accessible by external
functions.
 New data & functions can
be added whenever
necessary.
Object
Class
Data Encapsulation
Data Abstraction
Inheritance
Polymorphism
Dynamic Binding
Message Passing
Concepts
1. Object: They are the basic run-time entities, they represent a
user-defined data.
2. Class: It is a collection of objects of similar type, they’re user
defined data types.
3. Data Encapsulation: Wrapping up of data & function into a
single unit called Class.
4. Data Abstraction: It is the act of representing essential features
without including the background details.
5. Inheritance: The mechanism of deriving a new class from an old
one i.e. objects of one class acquire the properties of objects of
another class (reusability of code).
6. Polymorphism: It is the ability to take more than one form.
7. Dynamic Binding: It refers to any code that is called is not
known until runtime.
8. Message passing: A set of objects that communicate with each
other.
User-Defined type Built-in type Derived type
Structure
Union
Class
Enumeration
Array
Function
Pointer
Reference
Void
Integral
type
Floating
type
Char(1)
Int(2) & long int(4)
Double(8)
Float(4)
 Assignment(=): Assign the values.
 Mathematical(+,-,*,/,%): Mathematical operations.
 Relational(< >,<=,>=,++,!=): Comparison.
 Logical(&&,||): Combine 2 different expression.
 Bitwise(&,|,^,~): Change individual bits into number.
 Shift(<<,>>,>>>): Shift bits of any variable.
 Unary(++,--): Used with one operand only.
 Ternary(?:): Used with 3 operands.
 Comma(,): Separation of variables and expressions.
 In C++, the declaration of variable is allowed
anywhere in the scope i.e. Variables can be
declared right at the place of its use.
 There are total 64 keywords in C++ given by ANSI.
Scope of Variables
All the variables have their area of functioning, and
out of that boundary they don't hold their value, this
boundary is called scope of the variable.
 Global Variables
 Local variables
 Those variables which are
once declared and can be
used throughout the lifetime
of the program by any class
or any function.
 They must be declared
outside the main() function.
 Those variables which exist
only between the curly
braces, in which its declared.
 Outside that they are
unavailable and leads to
compile time error.
Cout<<: Output operator
Cin>>:Intput operator
OUTPUT
 Class is a collection of objects of similar type.
 Classes are user defined datatypes.
 Once class is defined, then object is created & member fucntions are used.
Sequence Selection Loop
Action 1
Action 2
Action 3
Entry
Exit
Straight line
Switch
If--else
While
Do while
For
Condition
Is
Tested
(True/False) Loops
runs
In
it
Action 1 Action 2
Action 3
Entry
Exit
Condition
 If-else
 Switch
True False
Action 1
Entry
Exit
Condition
 Do-while
 While
 For
True
False
Action 2
Loop
 Kanetkar, P.Y. “Let Us C++” Seventh Edition
2007, pp. 34-37, BPB Publications, New
Delhi-1.
 Balaguruswamy, E. “Object Oriented
Programming with C++” Eighth Edition 2016,
pp. 14-40, Mc Graw Hill Education (India)
Private Limited, New Delhi-110016.
Introduction to C++ Programming

More Related Content

What's hot

2CPP08 - Overloading and Overriding
2CPP08 - Overloading and Overriding2CPP08 - Overloading and Overriding
2CPP08 - Overloading and OverridingMichael Heron
 
4- Inheritance, Aggregation, Encapsulation and Overloading
4- Inheritance, Aggregation, Encapsulation and Overloading4- Inheritance, Aggregation, Encapsulation and Overloading
4- Inheritance, Aggregation, Encapsulation and OverloadingGhadeer AlHasan
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#Dr.Neeraj Kumar Pandey
 
Keywords in python
Keywords in pythonKeywords in python
Keywords in pythonPushpakBhoge
 
Inheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismInheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismJawad Khan
 
Doppl development iteration #2
Doppl development   iteration #2Doppl development   iteration #2
Doppl development iteration #2Diego Perini
 
Learn Concept of Class and Object in C# Part 3
Learn Concept of Class and Object in C#  Part 3Learn Concept of Class and Object in C#  Part 3
Learn Concept of Class and Object in C# Part 3C# Learning Classes
 
Object oriented programming in C++
Object oriented programming in C++Object oriented programming in C++
Object oriented programming in C++jehan1987
 
Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Anil Bapat
 

What's hot (20)

Object-Oriented Programming Using C++
Object-Oriented Programming Using C++Object-Oriented Programming Using C++
Object-Oriented Programming Using C++
 
2CPP08 - Overloading and Overriding
2CPP08 - Overloading and Overriding2CPP08 - Overloading and Overriding
2CPP08 - Overloading and Overriding
 
4- Inheritance, Aggregation, Encapsulation and Overloading
4- Inheritance, Aggregation, Encapsulation and Overloading4- Inheritance, Aggregation, Encapsulation and Overloading
4- Inheritance, Aggregation, Encapsulation and Overloading
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
Oops
OopsOops
Oops
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#
 
Recursion CBSE Class 12
Recursion CBSE Class 12Recursion CBSE Class 12
Recursion CBSE Class 12
 
Class and object
Class and objectClass and object
Class and object
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
 
Keywords in python
Keywords in pythonKeywords in python
Keywords in python
 
C++ classes
C++ classesC++ classes
C++ classes
 
My c++
My c++My c++
My c++
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance
InheritanceInheritance
Inheritance
 
Inheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphismInheritance, friend function, virtual function, polymorphism
Inheritance, friend function, virtual function, polymorphism
 
Polymorphism in oop
Polymorphism in oopPolymorphism in oop
Polymorphism in oop
 
Doppl development iteration #2
Doppl development   iteration #2Doppl development   iteration #2
Doppl development iteration #2
 
Learn Concept of Class and Object in C# Part 3
Learn Concept of Class and Object in C#  Part 3Learn Concept of Class and Object in C#  Part 3
Learn Concept of Class and Object in C# Part 3
 
Object oriented programming in C++
Object oriented programming in C++Object oriented programming in C++
Object oriented programming in C++
 
Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++
 

Similar to Introduction to C++ Programming

Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++Amresh Raj
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1ReKruiTIn.com
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]Rome468
 
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.docabdulhaq467432
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questionsAniketBhandare2
 
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++  Langauage Training in Ambala ! BATRA COMPUTER CENTREC++  Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTREjatin batra
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++KAUSHAL KUMAR JHA
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)Jay Patel
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introductionsandeep54552
 
Technical_Interview_Questions.pdf
Technical_Interview_Questions.pdfTechnical_Interview_Questions.pdf
Technical_Interview_Questions.pdfadityashukla939020
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented ProgrammingGamindu Udayanga
 
C questions
C questionsC questions
C questionsparm112
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answersAkash Gawali
 

Similar to Introduction to C++ Programming (20)

Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
 
C++
C++C++
C++
 
Intervies
InterviesIntervies
Intervies
 
Question bank unit i
Question bank unit iQuestion bank unit i
Question bank unit i
 
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questions
 
The smartpath information systems c plus plus
The smartpath information systems  c plus plusThe smartpath information systems  c plus plus
The smartpath information systems c plus plus
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++  Langauage Training in Ambala ! BATRA COMPUTER CENTREC++  Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
 
C++ programing lanuage
C++ programing lanuageC++ programing lanuage
C++ programing lanuage
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
C++ programming introduction
C++ programming introductionC++ programming introduction
C++ programming introduction
 
Technical_Interview_Questions.pdf
Technical_Interview_Questions.pdfTechnical_Interview_Questions.pdf
Technical_Interview_Questions.pdf
 
C++ Version 2
C++  Version 2C++  Version 2
C++ Version 2
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
 
C questions
C questionsC questions
C questions
 
1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers1183 c-interview-questions-and-answers
1183 c-interview-questions-and-answers
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Introduction to C++ Programming

  • 1.
  • 2.  What is “C++” ?  Benefits of C++ over C language  Object Oriented Programming in C++  Datatypes in C++  Operators in C++  Variables in C++  Syntax & Structure of C++ Programme  Basic example of C++  Creating Classes in C++  Controlling structures in C++  Example of C++  References
  • 3.  C++ is an extension of C programming and was developed by Bjarne Stroustup at AT & T’s Bell Laboratory in USA in 1980s.  C++ is an intermediate level language, as it comprises both high level and low level language features.  C++ is a free form, general-purpose language.  C++ is an Object Oriented Programming language but is not purely Object Oriented because of its features like Friend and Virtual
  • 4.  All the OOP’s features in C++ like Abstraction, Encapsulation, Inheritance etc makes it more worthy and useful for programmers.  C++ supports and allows user defined operators (i.e Operator Overloading) and function overloading is also supported in it.  Inline Functions in C++ instead of Macros in C language. Inline functions make complete function body act like Macro, safely.  Variables can be declared anywhere in the program in C++, but must be declared before they are used.
  • 5.  Object-oriented means a term which is interpreted differently by different people.  Programs are divided into Objects.  Data is hidden & not accessible by external functions.  New data & functions can be added whenever necessary. Object Class Data Encapsulation Data Abstraction Inheritance Polymorphism Dynamic Binding Message Passing Concepts
  • 6. 1. Object: They are the basic run-time entities, they represent a user-defined data. 2. Class: It is a collection of objects of similar type, they’re user defined data types. 3. Data Encapsulation: Wrapping up of data & function into a single unit called Class. 4. Data Abstraction: It is the act of representing essential features without including the background details. 5. Inheritance: The mechanism of deriving a new class from an old one i.e. objects of one class acquire the properties of objects of another class (reusability of code). 6. Polymorphism: It is the ability to take more than one form. 7. Dynamic Binding: It refers to any code that is called is not known until runtime. 8. Message passing: A set of objects that communicate with each other.
  • 7. User-Defined type Built-in type Derived type Structure Union Class Enumeration Array Function Pointer Reference Void Integral type Floating type Char(1) Int(2) & long int(4) Double(8) Float(4)
  • 8.  Assignment(=): Assign the values.  Mathematical(+,-,*,/,%): Mathematical operations.  Relational(< >,<=,>=,++,!=): Comparison.  Logical(&&,||): Combine 2 different expression.  Bitwise(&,|,^,~): Change individual bits into number.  Shift(<<,>>,>>>): Shift bits of any variable.  Unary(++,--): Used with one operand only.  Ternary(?:): Used with 3 operands.  Comma(,): Separation of variables and expressions.
  • 9.  In C++, the declaration of variable is allowed anywhere in the scope i.e. Variables can be declared right at the place of its use.  There are total 64 keywords in C++ given by ANSI. Scope of Variables All the variables have their area of functioning, and out of that boundary they don't hold their value, this boundary is called scope of the variable.  Global Variables  Local variables
  • 10.  Those variables which are once declared and can be used throughout the lifetime of the program by any class or any function.  They must be declared outside the main() function.  Those variables which exist only between the curly braces, in which its declared.  Outside that they are unavailable and leads to compile time error.
  • 13.  Class is a collection of objects of similar type.  Classes are user defined datatypes.  Once class is defined, then object is created & member fucntions are used.
  • 14. Sequence Selection Loop Action 1 Action 2 Action 3 Entry Exit Straight line Switch If--else While Do while For Condition Is Tested (True/False) Loops runs In it
  • 15. Action 1 Action 2 Action 3 Entry Exit Condition  If-else  Switch True False
  • 16. Action 1 Entry Exit Condition  Do-while  While  For True False Action 2 Loop
  • 17.
  • 18.
  • 19.  Kanetkar, P.Y. “Let Us C++” Seventh Edition 2007, pp. 34-37, BPB Publications, New Delhi-1.  Balaguruswamy, E. “Object Oriented Programming with C++” Eighth Edition 2016, pp. 14-40, Mc Graw Hill Education (India) Private Limited, New Delhi-110016.