SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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++
 

Semelhante a 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
 

Semelhante a 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
 

Último

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

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.