Which of the following correctly describes overloading of functions?

By Priyanshu Vaish|Updated : June 27th, 2022

Which of the following correctly describes overloading of functions?

  1. Ad-hoc polymorphism
  2. Virtual polymorphism
  3. Transient polymorphism
  4. Pseudo polymorphism

Answer: A. Ad-hoc polymorphism

Ad-hoc polymorphism correctly describes overloading of functions.

Solution

The answer to the question- Which of the following correctly describes overloading of functions? is explained in detail here. Functions with the same name can behave differently for each type allowed in ad-hoc polymorphism. Ad hoc polymorphism is a type of polymorphism in programming languages where polymorphic functions can be applied to arguments of various types. This is because a polymorphic function may denote a variety of unique and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied.

☛ Related Questions:

Comments

write a comment

ESE & GATE ME

Mechanical Engg.GATEGATE MEHPCLBARC SOESEIES MEBARC ExamISRO ExamOther Exams

Follow us for latest updates