Virtual Function Quiz-Asked in Interviews

Dec 25, 2021


Which of the following is not correct for virtual function in C++?

A)Must be declared in public section of a class.

B)Virtual function can be static.

C)Virtual function should be accessed using pointers.

D)Virtual function is defined in the base class.


B) is Correct

Virtual function is can’t be static in C++.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.




Upskilling students for tech placements!