Question: Which of the following is a mechanism of static polymorphism?
[A]. Operator overloading
[B]. Function overloading[C]. Templates
[D]. All of the above
[B]. Function overloading[C]. Templates
[D]. All of the above
Answer: Option D
Answer: Option D
Answer: Option C
Answer: Option B
Answer: Option D
Answer: Option B
Explanation:
The two main types of polymorphism are run-time (implemented as inheritance and virtual functions), and compile-time (implemented as templates).
Answer: Option B
Answer: Option D
Answer: Option C
Answer: Option C
Answer: Option C