adplus-dvertising
frame-decoration

Question

What is a VFTABLE pointer?

a.

A pointer that is used to find the correct function when someone calls into one of the virtual methods.

b.

A pointer that is initialized by compiler-generated code to point to the correct virtual function table.

c.

A pointer that is used to determine which specific descendant of a class will be passed to a function.

d.

A pointer that is used to allow a program to utilize an object’s services without knowing which particular object type it is using.

Posted under Reverse Engineering

Answer: (b).A pointer that is initialized by compiler-generated code to point to the correct virtual function table. Explanation:In runtime, the compiler adds a new VFTABLE pointer to the beginning of the object, usually before the first data member. Upon object instantiation, the VFTABLE pointer is initialized (by compiler-generated code) to point to the correct virtual function table.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is a VFTABLE pointer?