20 : Which among the following can't be used for polymorphism
Answers
Question:
Which among the following can't be used for polymorphism
a. Static member functions
b. Member functions overloading
c. Predefined operator overloading
d. Constructor overloading
Answer:
The correct option is (a) Static member functions.
Explanation:
No object has any ownership over static member functions. As a result, overloading or overriding cannot be considered. Function must be an object property, not just a class attribute, for polymorphism to exist.
Static member function: Any other regular data member cannot be accessed by a static member function, which is a unique member function used to access only static data members. Static member functions are class functions, same like static data members, however they are not connected to any class objects.
#SPJ3