MCQOPTIONS
Bookmark
Saved Bookmarks
→
C Sharp Programming
→
Generics
→
We can derive a class from a base class even if th...
1.
We can derive a class from a base class even if the base class's source code is not available.
A.
1
B.
Answer» B.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
Which of the following statements are correct about the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class index { protected int count; public index() { count = 0; } } class index1: index { public void increment() { count = count +1; } } class MyProgram { static void Main(string[] args) { index1 i = new index1(); i.increment(); } } }count should be declared as public if it is to become available in the inheritance chain. count should be declared as protected if it is to become available in the inheritance chain. While constructing an object referred to by i firstly constructor of index class will be called followed by constructor of index1 class. Constructor of index class does not get inherited in index1 class. count should be declared as Friend if it is to become available in the inheritance chain.
How can you make the private members inheritable?
The private members of the base class are visible in derived class but are not accessible directly.
If a derived class object is created, which constructor is called first?
While inheriting a class, if no access mode is specified, then which among the following is true? (in C++)
Members which are not intended to be inherited are declared as ________________
If a base class is inherited in protected access mode then which among the following is true?
Which access type data gets derived as private member in derived class?
Which type of inheritance leads to diamond problem?
Which is the correct syntax of inheritance?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies