x

Choose Country Code

x

Direction

x

Ask a Question

  • Ask a Question
  • Scan a Question
  • Post MCQ
  • Note: File extension must be of jpg, jpeg, png, bmp format and file size must not exceed 5 MB
x

Ask a Question

x

x
x
x
Hire a Tutor

Answers and Solutions

What's Your Question?
Answer

A pure virtual function or pure virtual method is avirtual function that is required to be implemented by a derived class if the derived class is not abstract. Classes containing pure virtual methods are termed "abstract" and they cannot be instantiated directly.

Answer

If the Virtual Function in the Base Class is equlaized to Zero then it is called as Pure Virtual Function. In Short it can be also told as the function doesnot used for Object Creation is equalized to Zero which in turn called as Pure Virtual Function.

virtual void add() = 0 is the example for Pure Virtual Function.

Answer

A pure virtual function is a function that has the notation "= 0" in the declaration of that function. Why we would want a pure virtual function and what a pure virtual function looks like is explored in more detail below.

class SomeClass { public: virtual void pure_virtual() = 0; // a pure virtual function // note that there is no function body };

Answer

A pure virtual function or pure virtual method is avirtual function that is required to be implemented by a derived class if the derived class is not abstract. Classes containing pure virtual methods are termed "abstract" and they cannot be instantiated directly.

Answer
Pure virtual function is used to declare a abstract method in the c++ Pure virtual function is a function with out definition is called pure virtual function Syntax: virtual rettype funcname(args list)=0 Virtual void display()=0

Post Answer and Earn Credit Points

Get 5 credit points for each correct answer. The best one gets 25 in all.

Post Answer