1.

What is vptr?(a) A hidden pointer in a class that points to a virtual table of that class(b) A hidden pointer in a class that points to virtual functions of that class(c) A hidden pointer in a class that points to virtual members of the class of that class(d) A pointer in a class that points to other classI got this question in quiz.My question is taken from vtable and vptr topic in section Class Hierarchies, Library & Containers of C++

Answer»

Correct ANSWER is (a) A hidden POINTER in a CLASS that points to a virtual table of that class

The best I can EXPLAIN: vptr is a hidden pointer available with classes which are used to POINT to the virtual table of a class.



Discussion

No Comment Found

Related InterviewSolutions