1.

Which is the correct syntax of declaring a virtual function?(a) virtual int func();(b) virtual int func(){};(c) inline virtual func();(d) inline virtual func(){};

Answer» The correct answer is (a) virtual int func();

To explain I would say: To make a function virtual function we just need to add virtual keyword at the starting of the function declaration.


Discussion

No Comment Found

Related InterviewSolutions