answersLogoWhite

0

Does structure support polymorphism

Updated: 8/20/2019
User Avatar

Wiki User

12y ago

Best Answer

Yes. The only difference between a struct and a class is that a struct's members and inheritance is public by default, while a class' members and inheritance are private by default. Structs can derive from classes and classes can derive from structs. As such, they are polymorphic.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Does structure support polymorphism
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Does c language support polymorphism?

C++ does.


What is Differentiate between polymorphism and isomerism?

Polymorphism and Allotropy are same thing. Polymorphism is used for compounds and the allotropy is reserved for elements. You can go for XRD to check the crystal structure and their composition to distinguish.


Does non crystalline material possess the concept of allotropy or polymorphism?

When the crystalline structure has more than one structure, the material is called Polymorphic.


Polymorphism in coelentrates?

polymorphism in coelentrates


Difference between a class and a struct?

By default, all of the members of a class are private and, by default, all of the members of a structure are public.Structure are value type where as class are reference type.'this' pointer will work only in class.Inheritance between classes is also private by default, and inheritance between structs is public by default.Classes support polymorphism, whereas structure do not.


What is polymorphism and its types?

Polymorphism means multiple form of a function, variable or object. In Computer Science, polymorphism is a programming language feature that allows values of different data types to be handles using a common interface. There are three types : Ad-Hoc Polymosphism, Parametric Polymorphism, Subtype/Inclusion Polymorphism. Source: Wikipedia.


What kind of drugs commonly has polymorphism?

Polymorphism is common with barbiturates, steroids, and sulphonamides.


Is polymorphism exist between prokaryotes?

Yes, polymorphism exists between the prokaryotes.


What is Difference between dynamic polymorphism and static polymorphism with example?

Static polymorphism is used the concept of early binding or we can say compile time binding where as dynamic polymorphism used the concept of late binding or run time binding.


How can one detect polymorphism by genetic marker?

One can detect polymorphism by genetic marker using single-nucleotide polymorphism which is able to even tell mutation of a gene.


Does java support oops concept?

Yes. Java is an Object Oriented Programming Language and it supports the OOPS concepts like Inheritance, Polymorphism etc


What is a synonymm for oops?

OOPS refers to Object Oriented Programming Structure. Some common terms used in oops are # Inheritance # Polymorphism # Encapsulation # Data hiding etc..