Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
C++
4.1k+ articles
C++ Programs
2.5k+ articles
School Programming
1.4k+ articles
CPP Examples
700+ articles
CPP-Functions
600+ articles
cpp-class
57 articles
CPP-OOPs
47 articles
cpp-constructor
37 articles
C++-Inheritance
22 articles
cpp-virtual
17 articles
cpp-inheritance
28 posts
Popular Articles
Recent Articles
How to Implement Interfaces Using Abstract Class in C++
Last Updated: 27 June 2024
C++ doesn't have built-in functionality of interfaces like other programming languages such as Java. However, interfaces can be implemented
...read more
cpp-virtual
cpp-inheritance
C++
C++-Inheritance
C++-Virtual Functions
Abstract Class and Interface
C++ Programs
Picked
CPP Examples
How to Create a Derived Class from a Base Class in C++?
Last Updated: 18 March 2024
In C++, one of the fundamental concepts of Object Oriented Programming (OOPS) is inheritance, allowing users to create new classes based on
...read more
cpp-class
cpp-inheritance
C++
C++-Class and Object
C++-Inheritance
C++ Programs
Picked
CPP Examples
When to Use Virtual Destructors in C++?
Last Updated: 25 January 2024
In C++, destructors are special members of a class that frees memory occupied by an object when it goes out of scope. A virtual destructor i
...read more
cpp-virtual
cpp-inheritance
cpp-destructor
C++
C++ Programs
Picked
CPP-OOPs
CPP Examples
Similar Topics
C++
4.1k+ articles
C++ Programs
2.5k+ articles
School Programming
1.4k+ articles
CPP Examples
700+ articles
CPP-Functions
600+ articles
cpp-class
57+ articles
CPP-OOPs
47+ articles
cpp-constructor
37+ articles
C++-Inheritance
22+ articles
cpp-virtual
17+ articles
C++ Inheritance Access
Last Updated: 11 March 2025
Prerequisites:Class-Object in C++Inheritance in C++Before learning about Inheritance Access we need to know about access specifiers. There a
...read more
Technical Scripter
cpp-inheritance
C++
Picked
Technical Scripter 2022
C++ Program to Create an Interface
Last Updated: 05 November 2024
Interfaces are a feature of Java that allows us to define an abstract type that defines the behaviour of a class. In C++, there is no concep
...read more
cpp-virtual
cpp-inheritance
C++
C++ Programs
Picked
C++ Misc Programs
CPP-OOPs
Inheritance Ambiguity in C++
Last Updated: 21 December 2022
Pre-requisites: Inheritance in C++, Multiple Inheritance in C++In multiple inheritances, when one class is derived from two or more base cla
...read more
cpp-inheritance
C++
Geeks-Premier-League-2022
Geeks Premier League
Constructor in Multilevel Inheritance in C++
Last Updated: 07 March 2022
Constructor is a class member function with the same name as the class. The main job of the constructor is to allocate memory for class obje
...read more
cpp-constructor
cpp-inheritance
C++
Geeks-Premier-League-2022
Geeks Premier League
C++ Interview Questions on Virtual Function and Abstract Class
Last Updated: 01 November 2024
Diving into the depths of C++ programming requires a solid grasp of some of its most important topics, such as virtual functions and abstrac
...read more
cpp-virtual
cpp-inheritance
C++
CS - Placements
Interview-Questions
Interview Questions
Publicly inherit a base class but making some of public method as private
Last Updated: 25 February 2018
There are certain situation when we want to make some of the public base class functions as private in the derived class. Suppose both base
...read more
cpp-inheritance
C++
C/C++ Puzzles
Calling virtual methods in constructor/destructor in C++
Last Updated: 18 August 2021
Prerequisite: Virtual Function in C++Calling virtual functions from a constructor or destructor is considered dangerous most of the times an
...read more
cpp-virtual
cpp-inheritance
C++
What happens when a virtual function is called inside a non-virtual function in C++
Last Updated: 11 April 2023
Predict the output of the following simple C++ program without any virtual function. [tabby title="CPP"][sourcecode language="cpp"]#include
...read more
cpp-virtual
cpp-inheritance
C++
Does overloading work with Inheritance?
Last Updated: 20 August 2024
If we have a function in base class and another function with the same name in derived class, can the base class function be called from der
...read more
CPP-Functions
cpp-inheritance
C Language
C++
cpp-overloading
What all is inherited from parent class in C++?
Last Updated: 05 September 2023
Following are the things that a derived class inherits from its parent:All the public and protected data members and member functions of the
...read more
GFacts
cpp-inheritance
C Language
C++
School Programming
First
1
2
First
1
2
First
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !