...
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 65
Which of the following is not correct for virtual function in C++ ?
A
Must be declared in public section of class
B
Virtual function can be static
C
Virtual function should be accessed using pointers.
D
Virtual function is defined in base class
Question 65 Explanation: 
→ Virtual functions are called only for objects of class types, you cannot declare global or static functions as virtual.
Correct Answer: B
Question 65 Explanation: 
→ Virtual functions are called only for objects of class types, you cannot declare global or static functions as virtual.

Leave a Reply

Your email address will not be published. Required fields are marked *