adplus-dvertising
frame-decoration

Question

What is a virtual function table?

a.

A table that is created at runtime to determine which particular method is called when an overloaded base-class method is invoked.

b.

A table that is created at compile time for classes that define virtual functions and for descendant classes that provide overloaded implementations of virtual functions defined in other classes.

c.

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

d.

A table that contains hard-coded pointers to all virtual function implementations within a specific class.

Posted under Reverse Engineering

Answer: (b).A table that is created at compile time for classes that define virtual functions and for descendant classes that provide overloaded implementations of virtual functions defined in other classes. Explanation:Compilers implement the virtual function mechanism by use of a virtual function table, which is created at compile time for classes that define virtual functions and for descendant classes that provide overloaded implementations of virtual functions defined in other classes.

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 virtual function table?

Similar Questions

Discover Related MCQs

Q. Are virtual function calls runtime features or compile-time features?

Q. What is the idea behind virtual functions?

Q. What should you check to confirm that a class method call is a regular, nonvirtual call?

Q. How do some compilers such as G++ pass the this pointer to a nonvirtual member function?

Q. What is the purpose of the this pointer?

Q. What are class methods?

Q. Why is the layout of an inherited class in memory important?

Q. How does the compiler arrange the classes in memory in an inherited class?

Q. What is inheritance in object-oriented programming?

Q. How is a plain-vanilla class with no inheritance implemented in assembly language?

Q. What is the purpose of the this pointer in a class?

Q. Why are classes important in object-oriented languages?

Q. What is a class in object-oriented design?

Q. What is the advantage of searching through a binary tree?

Q. What are the two pointers usually found in a binary tree item?

Q. What advantage do trees have over arrays?

Q. What is a binary tree?

Q. Can programs traverse a doubly linked list backward?

Q. What does the "previous" pointer in a doubly linked list point to?

Q. What advantage does a doubly linked list have over a singly linked list?