SlideShare a Scribd company logo
1 of 17
C++
Structures
1
Sructure
 Structure is a collection of variables of different data types under a single
name. It is similar to a class in that, both holds a collection of data of
different data types.
 Structure definition
struct tagname
{
data variable name 1
data variable name 2
………………………………..
………………………………..
};
2
Array of structure
 Structure is collection of different data type. An object of
structure represents a single record in memory, if we want more than one
record of structure type, we have to create an array of structure or object.
struct struct-name
{
datatype var1;
datatype var2;
- - - - - - - - - -
- - - - - - - - - -
datatype varN;
};
struct-name obj [ size ];
3
Files-Input & Output
 C++ comes with libraries which provides us many ways for performing input
and output.
 In C++ input and output is performed in the form of sequence of bytes or
more commonly known as streams.
 Input Stream: If the direction of flow of bytes is from device(for example:
Keyboard) to the main memory then this process is called input.
 Output Stream: If the direction of flow of bytes is opposite, i.e. from main
memory to device( display screen ) then this process is called output.
4
Sequential and Random acess
 Sequential Access: The computer system reads or writes information to the
file sequentially, starting from the beginning of the file and proceeding step
by step.
 It is faster than random access.
 Random Access: The computer system can read or write information
anywhere in the data file.
 We can search through it and find the data we need more easily.
5
Object oriented programmings(Oops)
 Object-Oriented Programming is a methodology or paradigm to design a
program using classes and objects.
 It simplifies the software development and maintenance by providing some
concepts.
6
Basic concepts of Oops
 Object:
 Any entity that has state and behavior is known as an object.
 For example: chair, pen, table, keyboard, bike etc. It can be physical and logical.
 Class:
 Collection of objects is called class.
 It is a logical entity.
 It is a user defined data type.
class class name {
access_specifier_1:
member1;
access_specifier_2:
member2;
...
} object names;
7
Basic concepts of Oops
 Class member function definitions
 Inside of the class definition
class class_name
{
private:
declarations;
public:
function_declaration(parameters)
{
function_body;
}
};
8
Basic concepts of Oops
 Outside of the class definition
return_type class_name::function_name(parameters)
{
function_body;
}
9
Basic concepts of Oops
 Data Abstraction:
 Data abstraction is a concept which hides the background details and represents
only the needed information to the outside world.
 Data Encapsulation:
 It is a technique which combines both data members and functions, operates on
that data in a single unit known as a class.
 Constructors:
 Constructor is a member function with the same name as the name of a class.
 It is used to initialize the objects of that class.
 They don’t have any return type.
10
Basic concepts of Oops
 Types of constructor
 Default Constructor
 A constructor without any parameters is called a default constructor.
 Every instance of the class will be initialized to the same values.
 Parameterized Constructor
 A constructor with at least one parameter is called a parametrized constructor.
 parametrized constructor is that you can initialize each instance of the class
with a different value.
 Copy Constructor
 The constructor which creates an object by copying variables from another
object is called a copy constructor.
 It is to initialize a new instance to the values of an existing instance.
11
Basic concepts of Oops
 Destructor:
 Destructor is a member function which destructs or deletes an object.
 A destructor has the same name as the class, preceded by a tilde (~).
 Rules for Destructor:
 Do not accept arguments.
 Do not return a value (or void).
 Inheritance:
 It is basically a method which provides a way that capabilities and properties from
one class to come into another class.
 We can form a new class from an existing class.
 Here the new class is called as the derived class and the existing class i.e. the class
from which the new class is derived is called as the base class.
12
Basic concepts of Oops
 Types of inheritance
 Single Inheritance: In single inheritance, a class is allowed to inherit from only
one class. i.e. one sub class is inherited by one base class only.
13
 Multiple Inheritance: Multiple Inheritance is a feature of C++ where a class can
inherit from more than one classes. i.e. one sub class is inherited from more than
one base classes.
14
 Multilevel Inheritance: In this type of inheritance, a derived class is created from
another derived class.
15
 Hybrid (Virtual) Inheritance: Hybrid Inheritance is implemented by combining
more than one type of inheritance.
16
 Hierarchical Inheritance: In this type of inheritance, more than one sub class is
inherited from a single base class. i.e. more than one derived class is created from
a single base class.
17

More Related Content

What's hot

What's hot (20)

C++ And Object in lecture3
C++  And Object in lecture3C++  And Object in lecture3
C++ And Object in lecture3
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
 
C++ classes
C++ classesC++ classes
C++ classes
 
Inner classes in java
Inner classes in javaInner classes in java
Inner classes in java
 
Data members and member functions
Data members and member functionsData members and member functions
Data members and member functions
 
Classes and objects till 16 aug
Classes and objects till 16 augClasses and objects till 16 aug
Classes and objects till 16 aug
 
[OOP - Lec 09,10,11] Class Members & their Accessing
[OOP - Lec 09,10,11] Class Members & their Accessing[OOP - Lec 09,10,11] Class Members & their Accessing
[OOP - Lec 09,10,11] Class Members & their Accessing
 
Java constructors
Java constructorsJava constructors
Java constructors
 
[OOP - Lec 20,21] Inheritance
[OOP - Lec 20,21] Inheritance[OOP - Lec 20,21] Inheritance
[OOP - Lec 20,21] Inheritance
 
4 Classes & Objects
4 Classes & Objects4 Classes & Objects
4 Classes & Objects
 
Unit3 part3-packages and interfaces
Unit3 part3-packages and interfacesUnit3 part3-packages and interfaces
Unit3 part3-packages and interfaces
 
[OOP - Lec 13,14,15] Constructors / Destructor and its Types
[OOP - Lec 13,14,15] Constructors / Destructor and its Types[OOP - Lec 13,14,15] Constructors / Destructor and its Types
[OOP - Lec 13,14,15] Constructors / Destructor and its Types
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVA
 
Classes in c++ (OOP Presentation)
Classes in c++ (OOP Presentation)Classes in c++ (OOP Presentation)
Classes in c++ (OOP Presentation)
 
Constant a,variables and data types
Constant a,variables and data typesConstant a,variables and data types
Constant a,variables and data types
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
C# classes objects
C#  classes objectsC#  classes objects
C# classes objects
 
JSpiders - Wrapper classes
JSpiders - Wrapper classesJSpiders - Wrapper classes
JSpiders - Wrapper classes
 
Nested class in java
Nested class in javaNested class in java
Nested class in java
 

Similar to Computer programming(C++): Structures

Similar to Computer programming(C++): Structures (20)

My c++
My c++My c++
My c++
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
Use Classes with Object-Oriented Programming in C++.ppt
Use Classes with Object-Oriented Programming in C++.pptUse Classes with Object-Oriented Programming in C++.ppt
Use Classes with Object-Oriented Programming in C++.ppt
 
Opp concept in c++
Opp concept in c++Opp concept in c++
Opp concept in c++
 
Question and answer Programming
Question and answer ProgrammingQuestion and answer Programming
Question and answer Programming
 
Oops
OopsOops
Oops
 
Oops
OopsOops
Oops
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptx
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
object oriented programming using java, second sem BCA,UoM
object oriented programming using java, second sem BCA,UoMobject oriented programming using java, second sem BCA,UoM
object oriented programming using java, second sem BCA,UoM
 
Classes & objects new
Classes & objects newClasses & objects new
Classes & objects new
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
 
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
python.pptx
python.pptxpython.pptx
python.pptx
 
C++ largest no between three nos
C++ largest no between three nosC++ largest no between three nos
C++ largest no between three nos
 
Selenium Training .pptx
Selenium Training .pptxSelenium Training .pptx
Selenium Training .pptx
 
Lecture 4. mte 407
Lecture 4. mte 407Lecture 4. mte 407
Lecture 4. mte 407
 

Recently uploaded

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Recently uploaded (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 

Computer programming(C++): Structures

  • 2. Sructure  Structure is a collection of variables of different data types under a single name. It is similar to a class in that, both holds a collection of data of different data types.  Structure definition struct tagname { data variable name 1 data variable name 2 ……………………………….. ……………………………….. }; 2
  • 3. Array of structure  Structure is collection of different data type. An object of structure represents a single record in memory, if we want more than one record of structure type, we have to create an array of structure or object. struct struct-name { datatype var1; datatype var2; - - - - - - - - - - - - - - - - - - - - datatype varN; }; struct-name obj [ size ]; 3
  • 4. Files-Input & Output  C++ comes with libraries which provides us many ways for performing input and output.  In C++ input and output is performed in the form of sequence of bytes or more commonly known as streams.  Input Stream: If the direction of flow of bytes is from device(for example: Keyboard) to the main memory then this process is called input.  Output Stream: If the direction of flow of bytes is opposite, i.e. from main memory to device( display screen ) then this process is called output. 4
  • 5. Sequential and Random acess  Sequential Access: The computer system reads or writes information to the file sequentially, starting from the beginning of the file and proceeding step by step.  It is faster than random access.  Random Access: The computer system can read or write information anywhere in the data file.  We can search through it and find the data we need more easily. 5
  • 6. Object oriented programmings(Oops)  Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects.  It simplifies the software development and maintenance by providing some concepts. 6
  • 7. Basic concepts of Oops  Object:  Any entity that has state and behavior is known as an object.  For example: chair, pen, table, keyboard, bike etc. It can be physical and logical.  Class:  Collection of objects is called class.  It is a logical entity.  It is a user defined data type. class class name { access_specifier_1: member1; access_specifier_2: member2; ... } object names; 7
  • 8. Basic concepts of Oops  Class member function definitions  Inside of the class definition class class_name { private: declarations; public: function_declaration(parameters) { function_body; } }; 8
  • 9. Basic concepts of Oops  Outside of the class definition return_type class_name::function_name(parameters) { function_body; } 9
  • 10. Basic concepts of Oops  Data Abstraction:  Data abstraction is a concept which hides the background details and represents only the needed information to the outside world.  Data Encapsulation:  It is a technique which combines both data members and functions, operates on that data in a single unit known as a class.  Constructors:  Constructor is a member function with the same name as the name of a class.  It is used to initialize the objects of that class.  They don’t have any return type. 10
  • 11. Basic concepts of Oops  Types of constructor  Default Constructor  A constructor without any parameters is called a default constructor.  Every instance of the class will be initialized to the same values.  Parameterized Constructor  A constructor with at least one parameter is called a parametrized constructor.  parametrized constructor is that you can initialize each instance of the class with a different value.  Copy Constructor  The constructor which creates an object by copying variables from another object is called a copy constructor.  It is to initialize a new instance to the values of an existing instance. 11
  • 12. Basic concepts of Oops  Destructor:  Destructor is a member function which destructs or deletes an object.  A destructor has the same name as the class, preceded by a tilde (~).  Rules for Destructor:  Do not accept arguments.  Do not return a value (or void).  Inheritance:  It is basically a method which provides a way that capabilities and properties from one class to come into another class.  We can form a new class from an existing class.  Here the new class is called as the derived class and the existing class i.e. the class from which the new class is derived is called as the base class. 12
  • 13. Basic concepts of Oops  Types of inheritance  Single Inheritance: In single inheritance, a class is allowed to inherit from only one class. i.e. one sub class is inherited by one base class only. 13
  • 14.  Multiple Inheritance: Multiple Inheritance is a feature of C++ where a class can inherit from more than one classes. i.e. one sub class is inherited from more than one base classes. 14
  • 15.  Multilevel Inheritance: In this type of inheritance, a derived class is created from another derived class. 15
  • 16.  Hybrid (Virtual) Inheritance: Hybrid Inheritance is implemented by combining more than one type of inheritance. 16
  • 17.  Hierarchical Inheritance: In this type of inheritance, more than one sub class is inherited from a single base class. i.e. more than one derived class is created from a single base class. 17