hamburger

Which of the following is a mechanism of static polymorphism?

By BYJU'S Exam Prep

Updated on: September 25th, 2023

Which of the following is a mechanism of static polymorphism?

  1. Operator overloading
  2. Function overloading
  3. Templates
  4. All of the above

Answer: D. All of the above

Operator overloading, Function overloading, and Templates are the mechanisms of static polymorphism.

Solution

During compile-time, a function and an object are linked, and this process is known as static polymorphism. Static binding is another name for it. Function overloading and Operator overloading are the two methods that C# offers to implement static polymorphism.

The same function name has many definitions in the same scope due to function overloading. The types and quantity of arguments in the argument list must be different according to the function’s definition. Function declarations that merely differ in return type cannot be overloaded. Hence according to the question- Which of the following is a mechanism of static polymorphism? Operator overloading, Function overloading, and Templates are the mechanisms of static polymorphism.

☛ Related Questions:

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium