1.

Which keyword is used to declare virtual functions?(a) virtual(b) virt(c) anonymous(d) virtuallyI got this question during an interview.Origin of the question is Virtual Functions in division Member Functions & its Types of Object Oriented Programming

Answer»

The correct CHOICE is (a) virtual

To explain I would say: The virtual KEYWORD is used to declare virtual functions. Anonymous keyword is used with CLASSES and have a different meaning. The virtual functions are used to call the INTENDED function of the derived class.



Discussion

No Comment Found

Related InterviewSolutions