Question
Easy

Choose true statements about virtual functions in C++: I: The virtual functions must be member of some class. II: They cannot be static members. III: A virtual function can be a friend of another class.

1
I and II
2
II and III
3
I and III
4
I, II and III
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Object-Oriented Programming (C++)
Topic: OOP Concepts
Correct Answer
Option D
Explanation

The correct option is (4): The correct option is (4): I, II and III are all true statements regarding virtual functions in C++. A virtual function is a C++ mechanism that enables runtime polymorphism, ensuring the correct overridden function is called based on the object's actual type, not the pointer or reference type. Statement I is true because the entire virtual mechanism relies on the inheritance structure of classes and…Read More

Choose true statements about - HTET Level 3 | Clear Cutoff