Data Structure
Java
Python
HTML
Interview Preparation
Interview Prep
Tutorials
Tracks
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.7K+ articles
C++
3.7K+ articles
CPP-Functions
619+ articles
Interview-Questions
474+ articles
CS – Placements
76+ articles
cpp-class
58+ articles
CPP-OOPs
51+ articles
cpp-constructor
37+ articles
cpp-inheritance
28+ articles
cpp-virtual
17 posts
Recent Articles
Popular Articles
How to Implement Interfaces Using Abstract Class in C++
Last Updated: 06 August 2025
C++ doesn't have built-in functionality of interfaces like other programming languages such as Java. However, interfaces can be implemented in C++ using the abstract class...
read more
C++ Programs
C++
Picked
cpp-virtual
cpp-inheritance
C++-Inheritance
C++-Virtual Functions
Abstract Class and Interface
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 is a special form of destructor ...
read more
C++ Programs
C++
Picked
cpp-virtual
cpp-inheritance
cpp-destructor
CPP-OOPs
CPP Examples
C++ Program to Create an Interface
Last Updated: 23 July 2025
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 concept of interfaces, but we can cre...
read more
C++ Programs
C++
Picked
cpp-virtual
cpp-inheritance
C++ Misc Programs
CPP-OOPs
Difference between Virtual function and Pure virtual function in C++
Last Updated: 12 July 2025
Virtual Function in C++ A virtual function is a member function which is declared within a base class and is re-defined(Overridden) by a derived class. When you refer to a...
read more
Technical Scripter
Difference Between
C++
Technical Scripter 2019
cpp-virtual
C++-Virtual Functions
Virtual Functions
Is body of a Default Constructor blank in C++?
Last Updated: 11 July 2025
The answer to this question depends upon 2 scenarios:Scenario 1: When there is a Virtual function in the program: In this scenario, compiler automatically creates virtual ...
read more
Technical Scripter
Programming Language
C++
cpp-virtual
cpp-constructor
C++ Interview Questions on Virtual Function and Abstract Class
Last Updated: 11 July 2025
Diving into the depths of C++ programming requires a solid grasp of some of its most important topics, such as virtual functions and abstract classes. These concepts are n...
read more
CS – Placements
C++
cpp-virtual
cpp-inheritance
Interview-Questions
Interview Questions
Early binding and Late binding in C++
Last Updated: 05 February 2018
Binding refers to the process of converting identifiers (such as variable and performance names) into addresses. Binding is done for each variable and functions. For funct...
read more
Misc
C++
cpp-virtual
cpp-inheritance
override identifier in C++
Last Updated: 27 November 2024
Function overriding is a redefinition of the base class function in its derived class with the same signature i.e. return type and parameters.But there may be situations w...
read more
Misc
C++
cpp-class
cpp-virtual
cpp-inheritance
CPP-OOPs
Virtual Function in C++
Last Updated: 30 September 2025
A virtual function is a member function that is declared within a base class using the keyword virtual and is re-defined (Overridden) in the derived class. Virtual functio...
read more
C++
cpp-virtual
cpp-inheritance
Calling virtual methods in constructor/destructor in C++
Last Updated: 23 July 2025
Prerequisite: Virtual Function in C++Calling virtual functions from a constructor or destructor is considered dangerous most of the times and must be avoided whenever poss...
read more
C++
cpp-virtual
cpp-inheritance
What happens when a virtual function is called inside a non-virtual function in C++
Last Updated: 23 July 2025
Predict the output of the following simple C++ program without any virtual function. CPP #include iostreamusing namespace std;class Base{public: void print()...
read more
C++
cpp-virtual
cpp-inheritance
Pure Virtual Destructor in C++
Last Updated: 23 July 2025
A pure virtual destructor can be declared in C++. After a destructor has been created as a pure virtual object(instance of a class), where the destructor body is provided....
read more
C++
cpp-virtual
cpp-constructor
Pure Virtual Functions and Abstract Classes in C++
Last Updated: 15 October 2025
A pure virtual function is a virtual function with no implementation in the base class, declared using = 0. A class with at least one pure virtual function is an abstract ...
read more
C++
cpp-virtual
cpp-inheritance
C++ final Specifier
Last Updated: 23 July 2025
In Java, we can use final for a function to make sure that it cannot be overridden. We can also use final in Java to make sure that a class cannot be inherited. Similarly,...
read more
C++
CPP-Functions
cpp-virtual
Can Virtual Functions be Inlined in C++?
Last Updated: 23 July 2025
Virtual functions are member functions that are declared in the base class using the keyword virtual and can be overridden by the derived class. They are used to achieve R...
read more
C++
CPP-Functions
cpp-virtual
1
2