C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 18)
18.
Which of the following correctly describes overloading of functions?
Discussion:
36 comments Page 1 of 4.
Manpreet Singh said:
3 years ago
What is Ad-hoc polymorphism?
Please explain me in detail.
Please explain me in detail.
(3)
Sam said:
4 years ago
Subtype polymorphism is also known as runtime polymorphism.
Parametric polymorphism is also known as compile-time polymorphism.
Ad-hoc polymorphism is also known as overloading.
Coercion is also known as (implicit or explicit) casting.
Parametric polymorphism is also known as compile-time polymorphism.
Ad-hoc polymorphism is also known as overloading.
Coercion is also known as (implicit or explicit) casting.
(7)
R.kani mozhi said:
8 years ago
Briefly explain the ad-hoc polymorphism.
Yamini said:
8 years ago
Can anyone please tell about overloading function in detail?
(1)
Bugslife said:
9 years ago
Then how it would be ad-hoc? If ad-hoc for operator overloading virtual used for overloading of functions.
Sanjay nannaware said:
9 years ago
The Four Polymorphisms in C++.
When people talk about polymorphism in C++ they usually mean the thing of using a derived class through the base class pointer or reference, which is called subtype polymorphism. But they often forget that there are all kinds of other polymorphisms in C++, such as parametric polymorphism, ad-hoc polymorphism and coercion polymorphism.
These polymorphisms also go by different names in C++,
Subtype polymorphism is also known as runtime polymorphism.
Parametric polymorphism is also known as compile-time polymorphism.
Ad-hoc polymorphism is also known as overloading.
Coercion is also known as (implicit or explicit) casting.
Ad-hoc polymorphism allows functions with the same name act differently for each type. For example, given two 'int' values and the '+' operator, it adds them together. Given two 'std::strings' it concatenates them together. This is called overloading.
When people talk about polymorphism in C++ they usually mean the thing of using a derived class through the base class pointer or reference, which is called subtype polymorphism. But they often forget that there are all kinds of other polymorphisms in C++, such as parametric polymorphism, ad-hoc polymorphism and coercion polymorphism.
These polymorphisms also go by different names in C++,
Subtype polymorphism is also known as runtime polymorphism.
Parametric polymorphism is also known as compile-time polymorphism.
Ad-hoc polymorphism is also known as overloading.
Coercion is also known as (implicit or explicit) casting.
Ad-hoc polymorphism allows functions with the same name act differently for each type. For example, given two 'int' values and the '+' operator, it adds them together. Given two 'std::strings' it concatenates them together. This is called overloading.
(3)
Gelu Menumorut said:
9 years ago
It seems like pseudo and transient polymorphisms are only made-up word associations that sound like something real, but they are not? Could they be also: dual or multi polymorphism, virtual polymorphism (nobody asks about it, hmmm), constant or mutable polymorphism, friendly polymorphism, volatile polymorphism, atomic polymorphism, mutual polymorphism, you can name it in too many combinations.
Soujanya said:
9 years ago
What is meant by function overloading? Why it is known as function polymorphism in OOPs?
Sri said:
9 years ago
What is a pseudo-polymorphism and transient polymorphism?
Please, explain it.
Please, explain it.
Vitthal said:
9 years ago
Can we add operator and function overloading together?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers