C++ Programmer Question:

Download Job Interview Questions and Answers PDF

Tell me how to create a pure virtual function?

C++ Programmer Interview Question
C++ Programmer Interview Question

Answer:

A function is made as pure virtual function by the using a specific signature, " = 0" appended to the function declaration as given below,
class SymmetricShape {
public:
// draw() is a pure virtual function.
virtual void draw() = 0;
};

Download C++ Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain void free (void* ptr)?Tell me what will the line of code below print out and why?