|
INTERVIEW QUESTIONS
MICROSOFT
C#
DETAILS
Question: What is mean "Death of Diamod"?
Answer: It is the diamond of death problem. Multiple Inheritance means the ability to inherit from more than a single direct base class. For example:
class Derived : public Base1, private Base2 { //... }; Allowing MI introduces the possibility that a class may have the same (direct or indirect) base class appear more than once as an ancestor. A simple example of this is the "Diamond of Death" shape:
B / C1 C2 / D Here B is an indirect base class of D twice, once via C1 and once via C2.
This situation introduces the need to an extra feature in C++: virtual inheritance. Does the programmer want D to have one B subobject, or two? If one, B should be a virtual base class; if two, B should be a normal (nonvirtual) base class.
|
|
|
Category |
C# Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8304 users |
Added on |
11/19/2012 |
Views |
74846 |
Rate it! |
|
|
Question:
What is mean "Death of Diamod"?
Answer:
It is the diamond of death problem. Multiple Inheritance means the ability to inherit from more than a single direct base class. For example:
class Derived : public Base1, private Base2 { //... }; Allowing MI introduces the possibility that a class may have the same (direct or indirect) base class appear more than once as an ancestor. A simple example of this is the "Diamond of Death" shape:
B / C1 C2 / D Here B is an indirect base class of D twice, once via C1 and once via C2.
This situation introduces the need to an extra feature in C++: virtual inheritance. Does the programmer want D to have one B subobject, or two? If one, B should be a virtual base class; if two, B should be a normal (nonvirtual) base class.
Source: CoolInterview.com
Answered by: siddharth barua | Date: 1/28/2008
| Contact siddharth barua
As every object is treated as a diamond in a Class we can say that destruction of a class object after it's functionality in order to recover the memory associated with this object is known as "Death of Diamond". Source: CoolInterview.com
Answered by: Dwaraka | Date: 3/24/2008
| Contact Dwaraka
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
what is the main difference between delegate and an event in c#?
|
View Answer
|
|
How to use HASH TABLE,ARRAYLIST in c# explain with example?
|
View Answer
|
|
Assemblies are of the following types:
|
View Answer
|
|
What is the difference between shadow and override
|
View Answer
|
|
What is the top .NET class that everything is derived from?
|
View Answer
|
|
C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?
|
View Answer
|
|
When you inherit a protected class-level variable?Who is it available to?
|
View Answer
|
|
Does C# support multiple inheritance?
|
View Answer
|
|
How do you inherit from a class in C#?
|
View Answer
|
|
What is an abstract class?
|
View Answer
|
|
What does the keyword virtual mean in the method definition?
|
View Answer
|
|
How's method overriding different from overloading?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All C# Interview Questions & Answers - Exam Mode /
Learning Mode
|