Inheritance - General Questions Online Exam Quiz
Inheritance - General Questions GK Quiz. Question and Answers related to Inheritance - General Questions. MCQ (Multiple Choice Questions with answers about Inheritance - General Questions
Which of the following can be facilitated by the Inheritance mechanism?
Options
A : 1, 2, 3
B : 3, 4
C : 2, 4, 5
D : 3, 5
Which of the following statements should be added to the subroutine fun( ) if the C#.NET code snippet given below is to output 9 13?
Options
A : Console.WriteLine(base.i + " " + i);
B : Console.WriteLine(i + " " + base.i);
C : Console.WriteLine(mybase.i + " " + i);
D : Console.WriteLine(i + " " + mybase.i);
Which of the following statements are correct about the C#.NET code snippet given below?
Options
A : 1, 2, 5
B : 2, 3, 4
C : 3, 5
D : 4, 5
What will be the size of the object created by the following C#.NET code snippet?
Options
A : 24 bytes
B : 12 bytes
C : 20 bytes
D : 10 bytes
Which statement will you add in the function fun() of class B , if it is to produce the output "Welcome to IndiaBIX.com!" ?
Options
A : base.fun();
B : A::fun();
C : fun();
D : mybase.fun();
What will be the output of the C#.NET code snippet given below?
Options
A : Base class
B : Derived1 class
C : Derived2 class
D : Base class Derived1 class
Which of the following should be used to implement a 'Has a' relationship between two entities?
Options
A : Polymorphism
B : Templates
C : Containership
D : Encapsulation
Which of the following is correct about the C#.NET snippet given below?
Options
A : The program gives the output as: Hi Hello Bye
B : The program gives the output as: Bye Hello
C : The program gives the output as: Hi Bye Hello
D : Error in the program
In an inheritance chain which of the following members of base class are accessible to the derived class members?
Options
A : 1, 3
B : 2, 5
C : 3, 4
D : 4, 5
Which of the following are reuse mechanisms available in C#.NET?
Options
A : 1, 4
B : 1, 3
C : 2, 4
D : 3, 5
Attributes - General Questions more Online Exam Quiz
.NET Framework - General Questions
Enumerations - General Questions
Exception Handling - General Questions
Functions and Subroutines - General Questions
Interfaces - General Questions
Namespaces - General Questions