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 3 of 4.
Swati said:
1 decade ago
I want to know about Pseudo polymorphism and Transient polymorphism?
Banu said:
1 decade ago
Can anyone give example pseudo polymorphism?
Pratishruti said:
1 decade ago
What is pseudo polymorphism or is there any other name to this?
RAM said:
1 decade ago
What is meant by Pseudo polymorphism?
Sudhanshu said:
1 decade 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.
Ramesh said:
1 decade ago
What is meant by Ad-hoc polymorphism, transient and pseudo polymorphism?
Shivajiswaraj said:
1 decade ago
Ad hoc polymorphism allows to funtion overloading.
Supreet kaur said:
1 decade ago
Is Ad-hoc polymorphism and overloading is the same thing?
Pavithra said:
1 decade ago
Ad-hoc polymorphism behaves differently for different data types with same name.
Can anyone explain about pseudo polymorphism and transient polymorphism?
Can anyone explain about pseudo polymorphism and transient polymorphism?
Shweta said:
1 decade ago
In programming languages, ad-hoc polymorphism is a kind of polymorphism in which polymorphic functions can be applied to arguments of different types, because a polymorphic function can denote a number of distinct and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied. It is also known as function overloading or operator overloading.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers